UNPKG

@sentry/core

Version:
165 lines (164 loc) • 7.84 kB
// src/semanticAttributes.ts /** * 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. */ 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 */ const SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = "sentry.previous_trace_sample_rate"; /** * Use this attribute to represent the operation of a span. * @deprecated Use `SENTRY_OP` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op"; /** * Use this attribute to represent the origin of a span. * @deprecated Use `SENTRY_ORIGIN` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin"; /** * Holds the human-readable span status message (e.g. set via * `span.setStatus({ code, message })`). * * Streamed (v2) span statuses are reduced to `ok`/`error`, so we preserve the * message as an attribute instead of dropping it. This mirrors the attribute * Sentry's OTLP ingestion uses for the same purpose. * @deprecated Use `SENTRY_STATUS_MESSAGE` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE = "sentry.status.message"; /** * The reason why an idle span finished. * @deprecated Use `SENTRY_IDLE_SPAN_FINISH_REASON` from `@sentry/conventions/attributes` instead. */ 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. */ const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit"; /** The value of a measurement, which may be stored as a TimedEvent. */ const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value"; /** * The release version of the application * @deprecated Use `SENTRY_RELEASE` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = "sentry.release"; /** * The environment name (e.g., "production", "staging", "development") * @deprecated Use `SENTRY_ENVIRONMENT` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = "sentry.environment"; /** * The segment name (e.g., "GET /users") * @deprecated Use `SENTRY_SEGMENT_NAME` `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = "sentry.segment.name"; /** * The id of the segment that this span belongs to. * @deprecated Use `SENTRY_SEGMENT_ID` `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = "sentry.segment.id"; /** * The name of the Sentry SDK (e.g., "sentry.php", "sentry.javascript") * @deprecated Use `SENTRY_SDK_NAME` `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = "sentry.sdk.name"; /** * The version of the Sentry SDK * @deprecated Use `SENTRY_SDK_VERSION` `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = "sentry.sdk.version"; /** * The list of integrations enabled in the Sentry SDK (e.g., ["EventFilters", "BrowserTracing"]) * @deprecated Use `SENTRY_SDK_INTEGRATIONS` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS = "sentry.sdk.integrations"; /** * The user ID * @deprecated Use `USER_ID` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_USER_ID = "user.id"; /** * The user email * @deprecated Use `USER_EMAIL` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_USER_EMAIL = "user.email"; /** * The user IP address * @deprecated Use `USER_IP_ADDRESS` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = "user.ip_address"; /** * The user username * @deprecated Use `USER_NAME` from `@sentry/conventions/attributes` instead. */ 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 */ const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = "sentry.custom_span_name"; /** * The id of the profile that this span occurred in. * @deprecated Use `SENTRY_PROFILE_ID` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_PROFILE_ID = "sentry.profile_id"; /** * @deprecated Use `SENTRY_EXCLUSIVE_TIME` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = "sentry.exclusive_time"; /** * @deprecated Use `CACHE_HIT` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_CACHE_HIT = "cache.hit"; /** * @deprecated Use `CACHE_KEY` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_CACHE_KEY = "cache.key"; /** * @deprecated Use `CACHE_ITEM_SIZE` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = "cache.item_size"; /** * @deprecated Use `HTTP_REQUEST_METHOD` from `@sentry/conventions/attributes` instead. */ const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = "http.request.method"; /** * @deprecated Use `URL_FULL` `@sentry/conventions/attributes` instead. */ 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. * @deprecated Use `SENTRY_LINK_TYPE` from `@sentry/conventions/attributes` instead. * @see https://develop.sentry.dev/sdk/telemetry/traces/span-links/#link-types */ 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 * @deprecated Use `GEN_AI_CONVERSATION_ID` from `@sentry/conventions/attributes` instead. */ const GEN_AI_CONVERSATION_ID_ATTRIBUTE = "gen_ai.conversation.id"; export { GEN_AI_CONVERSATION_ID_ATTRIBUTE, SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_RELEASE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS, SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME, SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE, SEMANTIC_ATTRIBUTE_URL_FULL, SEMANTIC_ATTRIBUTE_USER_EMAIL, SEMANTIC_ATTRIBUTE_USER_ID, SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS, SEMANTIC_ATTRIBUTE_USER_USERNAME, SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE }; //# sourceMappingURL=semanticAttributes.js.map