-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstandard.go
More file actions
93 lines (80 loc) · 2.98 KB
/
standard.go
File metadata and controls
93 lines (80 loc) · 2.98 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package semconv
import (
otel "go.opentelemetry.io/otel/semconv/v1.34.0"
)
// Re-exported standard OTel semantic conventions.
// Only symbols actively used across Lantern services belong here.
const SchemaURL = otel.SchemaURL
// Service resource attributes
const (
// ServiceNameKey is the logical service name, e.g. "router", "bandit".
ServiceNameKey = otel.ServiceNameKey
// ServiceVersionKey is the deployed version, e.g. "v2.4.1".
ServiceVersionKey = otel.ServiceVersionKey
// ServiceNamespaceKey groups related services, e.g. "lantern".
ServiceNamespaceKey = otel.ServiceNamespaceKey
)
// Cloud
const (
// CloudProviderKey is the cloud provider, e.g. "aws", "gcp", "azure".
CloudProviderKey = otel.CloudProviderKey
// CloudAvailabilityZoneKey is the zone, e.g. "us-east-1a".
CloudAvailabilityZoneKey = otel.CloudAvailabilityZoneKey
)
// Deployment
// DeploymentEnvironmentNameKey is "prod", "staging", or "dev".
const DeploymentEnvironmentNameKey = otel.DeploymentEnvironmentNameKey
// Host
const (
// HostNameKey is the OS hostname.
HostNameKey = otel.HostNameKey
// HostIDKey is a unique host identifier.
HostIDKey = otel.HostIDKey
// HostArchKey is the CPU architecture, e.g. "amd64", "arm64".
HostArchKey = otel.HostArchKey
)
// OS
const (
// OSNameKey is the operating system name, e.g. "linux", "darwin".
OSNameKey = otel.OSNameKey
// OSVersionKey is the OS version string, e.g. "14.0", "22.04".
OSVersionKey = otel.OSVersionKey
)
// Network
const (
// NetworkPeerAddressKey is the remote IP, e.g. "10.0.0.5".
NetworkPeerAddressKey = otel.NetworkPeerAddressKey
// NetworkPeerPortKey is the remote port, e.g. 443.
NetworkPeerPortKey = otel.NetworkPeerPortKey
// NetworkIODirectionKey is "transmit" or "receive".
NetworkIODirectionKey = otel.NetworkIODirectionKey
// NetworkProtocolNameKey is the protocol, e.g. "tcp", "udp".
NetworkProtocolNameKey = otel.NetworkProtocolNameKey
)
// HTTP
const (
// HTTPRequestMethodKey is "GET", "POST", etc.
HTTPRequestMethodKey = otel.HTTPRequestMethodKey
// HTTPResponseStatusCodeKey is the integer status, e.g. 200, 502.
HTTPResponseStatusCodeKey = otel.HTTPResponseStatusCodeKey
// HTTPRouteKey is the matched route pattern, e.g. "/users/:id".
HTTPRouteKey = otel.HTTPRouteKey
)
// Geo
const (
// GeoContinentCodeKey is a two-letter continent, e.g. "NA", "EU".
GeoContinentCodeKey = otel.GeoContinentCodeKey
// GeoCountryISOCodeKey is ISO 3166-1 alpha-2, e.g. "US", "IR".
GeoCountryISOCodeKey = otel.GeoCountryISOCodeKey
// GeoRegionISOCodeKey is ISO 3166-2, e.g. "US-CA", "DE-BY".
GeoRegionISOCodeKey = otel.GeoRegionISOCodeKey
// GeoLocalityNameKey is the city name, e.g. "San Francisco".
GeoLocalityNameKey = otel.GeoLocalityNameKey
// GeoLocationLatKey is the latitude, e.g. 37.7749.
GeoLocationLatKey = otel.GeoLocationLatKey
// GeoLocationLonKey is the longitude, e.g. -122.4194.
GeoLocationLonKey = otel.GeoLocationLonKey
)
// Error
// ErrorTypeKey classifies the error, e.g. "timeout", "cancel".
const ErrorTypeKey = otel.ErrorTypeKey