Documentation
¶
Overview ¶
Package semconv contains OpenTelemetry semantic convention constants.
Index ¶
- Constants
- func AttrClientIP(val string) otelattr.KeyValue
- func AttrDeprecatedFeatureID(id string) otelattr.KeyValue
- func AttrGeoLocation(val httpx.GeoLocation) []otelattr.KeyValue
- func AttrIdentityID[V string | uuid.UUID](val V) otelattr.KeyValue
- func AttrNID(val uuid.UUID) otelattr.KeyValue
- func AttrProjectAPIKeyID[V string | uuid.UUID](val V) otelattr.KeyValue
- func AttrProjectEnvironment(val string) otelattr.KeyValue
- func AttrSubscription(val uuid.UUID) otelattr.KeyValue
- func AttrWarningID(id string) otelattr.KeyValue
- func AttrWorkspace(val uuid.UUID) otelattr.KeyValue
- func AttrWorkspaceAPIKeyID[V string | uuid.UUID](val V) otelattr.KeyValue
- func AttributesFromContext(ctx context.Context) []attribute.KeyValue
- func ContextWithAttributes(ctx context.Context, attrs ...attribute.KeyValue) context.Context
- func Middleware(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func NewDeprecatedFeatureUsedEvent(ctx context.Context, deprecatedCodeFeatureID string, ...) (string, trace.EventOption)
- func NewWarning(ctx context.Context, id string, attrs ...otelattr.KeyValue) (string, trace.EventOption)
- type AttributeKey
- type Event
Constants ¶
View Source
const ( AttributeKeyDeprecatedCodePathIDAttributeKey AttributeKey = "DeprecatedFeatureID" DeprecatedFeatureUsed Event = "DeprecatedFeatureUsed" )
View Source
const ( Warning Event = "Warning" AttributeWarningID AttributeKey = "WarningID" )
Variables ¶
This section is empty.
Functions ¶
func AttrClientIP ¶ added in v0.0.522
func AttrDeprecatedFeatureID ¶ added in v0.0.660
func AttrGeoLocation ¶ added in v0.0.589
func AttrGeoLocation(val httpx.GeoLocation) []otelattr.KeyValue
func AttrProjectAPIKeyID ¶ added in v0.0.659
func AttrProjectEnvironment ¶ added in v0.0.628
func AttrWarningID ¶ added in v0.0.714
func AttrWorkspaceAPIKeyID ¶ added in v0.0.659
func AttributesFromContext ¶ added in v0.0.552
func ContextWithAttributes ¶ added in v0.0.552
func Middleware ¶ added in v0.0.552
func Middleware(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func NewDeprecatedFeatureUsedEvent ¶ added in v0.0.660
func NewDeprecatedFeatureUsedEvent(ctx context.Context, deprecatedCodeFeatureID string, attrs ...otelattr.KeyValue) (string, trace.EventOption)
NewDeprecatedFeatureUsedEvent creates a new event indicating that a deprecated feature was used. It returns the event name and a trace.EventOption that can be used to add the event to a span.
span.AddEvent(NewDeprecatedFeatureUsedEvent(ctx, "deprecated-feature-id", otelattr.String("key", "value")))
func NewWarning ¶ added in v0.0.714
func NewWarning(ctx context.Context, id string, attrs ...otelattr.KeyValue) (string, trace.EventOption)
NewWarning creates a new warning event with the given ID and attributes. It returns the event name and a trace.EventOption that can be used to add the event to a span.
span.AddEvent(NewWarning(ctx, "warning-id", otelattr.String("key", "value")))
Types ¶
type AttributeKey ¶ added in v0.0.552
type AttributeKey string
const ( AttributeKeyIdentityID AttributeKey = "IdentityID" AttributeKeyNID AttributeKey = "ProjectID" AttributeKeyClientIP AttributeKey = "ClientIP" AttributeKeyGeoLocationCity AttributeKey = "GeoLocationCity" AttributeKeyGeoLocationRegion AttributeKey = "GeoLocationRegion" AttributeKeyGeoLocationCountry AttributeKey = "GeoLocationCountry" AttributeKeyWorkspace AttributeKey = "WorkspaceID" AttributeKeySubscriptionID AttributeKey = "SubscriptionID" AttributeKeyProjectEnvironment AttributeKey = "ProjectEnvironment" AttributeKeyWorkspaceAPIKeyID AttributeKey = "WorkspaceAPIKeyID" AttributeKeyProjectAPIKeyID AttributeKey = "ProjectAPIKeyID" )
func (AttributeKey) String ¶ added in v0.0.552
func (a AttributeKey) String() string
Click to show internal directories.
Click to hide internal directories.