forked from launchdarkly/ld-relay
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.go
More file actions
44 lines (32 loc) · 1.5 KB
/
Copy pathconstants.go
File metadata and controls
44 lines (32 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package metrics
import (
"time"
"go.opencensus.io/tag"
)
const (
defaultMetricsPrefix = "launchdarkly_relay"
browserTagValue = "browser"
mobileTagValue = "mobile"
serverTagValue = "server"
connMeasureName = "connections"
privateConnMeasureName = "internal_connections"
newConnMeasureName = "newconnections"
privateNewConnMeasureName = "internal_newconnections"
privatePollingRequestsMeasureName = "internal_polling_requests"
requestMeasureName = "requests"
defaultFlushInterval = time.Minute
BrowserPlatformCategory = "browser"
MobilePlatformCategory = "mobile"
ServerPlatformCategory = "server"
)
var (
relayIDTagKey, _ = tag.NewKey("relayId") //nolint:gochecknoglobals
platformCategoryTagKey, _ = tag.NewKey("platformCategory") //nolint:gochecknoglobals
userAgentTagKey, _ = tag.NewKey("userAgent") //nolint:gochecknoglobals
sdkWrapperTagKey, _ = tag.NewKey("sdkWrapper") //nolint:gochecknoglobals
routeTagKey, _ = tag.NewKey("route") //nolint:gochecknoglobals
methodTagKey, _ = tag.NewKey("method") //nolint:gochecknoglobals
envNameTagKey, _ = tag.NewKey("env") //nolint:gochecknoglobals
publicTags = []tag.Key{platformCategoryTagKey, userAgentTagKey, sdkWrapperTagKey, envNameTagKey} //nolint:gochecknoglobals
privateTags = []tag.Key{platformCategoryTagKey, userAgentTagKey, sdkWrapperTagKey, relayIDTagKey, envNameTagKey} //nolint:gochecknoglobals
)