-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathsemanticAttributes.ts
More file actions
118 lines (99 loc) · 4.79 KB
/
semanticAttributes.ts
File metadata and controls
118 lines (99 loc) · 4.79 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/**
* Use this attribute to represent the source of a span name.
* Must be one of: custom, url, route, view, component, task
* TODO(v11): rename this to sentry.span.source'
*/
export const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';
/**
* Attributes that holds the sample rate that was locally applied to a span.
* If this attribute is not defined, it means that the span inherited a sampling decision.
*
* NOTE: Is only defined on root spans.
*/
export const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';
/**
* Attribute holding the sample rate of the previous trace.
* This is used to sample consistently across subsequent traces in the browser SDK.
*
* Note: Only defined on root spans, if opted into consistent sampling
*/
export const SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = 'sentry.previous_trace_sample_rate';
/**
* Use this attribute to represent the operation of a span.
*/
export const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';
/**
* Use this attribute to represent the origin of a span.
*/
export const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';
/** The reason why an idle span finished. */
export const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';
/** The unit of a measurement, which may be stored as a TimedEvent. */
export const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';
/** The value of a measurement, which may be stored as a TimedEvent. */
export const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';
/** The release version of the application */
export const SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = 'sentry.release';
/** The environment name (e.g., "production", "staging", "development") */
export const SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = 'sentry.environment';
/** The segment name (e.g., "GET /users") */
export const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = 'sentry.segment.name';
/** The id of the segment that this span belongs to. */
export const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = 'sentry.segment.id';
/** The name of the Sentry SDK (e.g., "sentry.php", "sentry.javascript") */
export const SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = 'sentry.sdk.name';
/** The version of the Sentry SDK */
export const SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = 'sentry.sdk.version';
/** The list of integrations enabled in the Sentry SDK (e.g., ["InboundFilters", "BrowserTracing"]) */
export const SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS = 'sentry.sdk.integrations';
/** The user ID (gated by sendDefaultPii) */
export const SEMANTIC_ATTRIBUTE_USER_ID = 'user.id';
/** The user email (gated by sendDefaultPii) */
export const SEMANTIC_ATTRIBUTE_USER_EMAIL = 'user.email';
/** The user IP address (gated by sendDefaultPii) */
export const SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = 'user.ip_address';
/** The user username (gated by sendDefaultPii) */
export const SEMANTIC_ATTRIBUTE_USER_USERNAME = 'user.name';
/**
* A custom span name set by users guaranteed to be taken over any automatically
* inferred name. This attribute is removed before the span is sent.
*
* @internal only meant for internal SDK usage
* @hidden
*/
export const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';
/**
* The id of the profile that this span occurred in.
*/
export const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';
export const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';
export const SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';
export const SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';
export const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';
/** TODO: Remove these once we update to latest semantic conventions */
export const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';
export const SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';
/**
* A span link attribute to mark the link as a special span link.
*
* Known values:
* - `previous_trace`: The span links to the frontend root span of the previous trace.
* - `next_trace`: The span links to the frontend root span of the next trace. (Not set by the SDK)
*
* Other values may be set as appropriate.
* @see https://develop.sentry.dev/sdk/telemetry/traces/span-links/#link-types
*/
export const SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = 'sentry.link.type';
/**
* =============================================================================
* GEN AI ATTRIBUTES
* Based on OpenTelemetry Semantic Conventions for Generative AI
* @see https://opentelemetry.io/docs/specs/semconv/gen-ai/
* =============================================================================
*/
/**
* The conversation ID for linking messages across API calls.
* For OpenAI Assistants API: thread_id
* For LangGraph: configurable.thread_id
*/
export const GEN_AI_CONVERSATION_ID_ATTRIBUTE = 'gen_ai.conversation.id';