@microsoft/opentelemetry
    Preparing search index...

    Class OpenTelemetryConstants

    OpenTelemetry constants for A365 observability.

    Provides the well-known span operation names, attribute keys, metric names, environment-variable names, and feature-flag switches used when emitting A365 telemetry. Attribute keys follow OTel gen-ai semantic conventions plus Microsoft-specific extensions under the microsoft.* namespace.

    Adapted from microsoft/Agent365-nodejs agents-a365-observability/src/tracing/constants.ts

    Index
    A365_MESSAGES_SCHEMA_VERSION_KEY AGENT_ID_KEY APPLY_GUARDRAIL_OPERATION_NAME AZ_NAMESPACE_KEY AZURE_RP_NAMESPACE_VALUE CHANNEL_LINK_KEY CHANNEL_NAME_KEY CHAT_OPERATION_NAME CUSTOM_PARENT_SPAN_ID_KEY CUSTOM_SPAN_NAME_KEY ENABLE_A365_OBSERVABILITY ENABLE_A365_OBSERVABILITY_EXPORTER ENABLE_OBSERVABILITY ENABLE_OPENTELEMETRY_SWITCH ERROR_MESSAGE_KEY ERROR_TYPE_CANCELLED ERROR_TYPE_KEY EXECUTE_TOOL_OPERATION_NAME GEN_AI_AGENT_AUID_KEY GEN_AI_AGENT_BLUEPRINT_ID_KEY GEN_AI_AGENT_DESCRIPTION_KEY GEN_AI_AGENT_EMAIL_KEY GEN_AI_AGENT_ID_KEY GEN_AI_AGENT_NAME_KEY GEN_AI_AGENT_PLATFORM_ID_KEY GEN_AI_AGENT_THOUGHT_PROCESS_KEY GEN_AI_AGENT_VERSION_KEY GEN_AI_CALLER_AGENT_APPLICATION_ID_KEY GEN_AI_CALLER_AGENT_EMAIL_KEY GEN_AI_CALLER_AGENT_ID_KEY GEN_AI_CALLER_AGENT_NAME_KEY GEN_AI_CALLER_AGENT_PLATFORM_ID_KEY GEN_AI_CALLER_AGENT_USER_ID_KEY GEN_AI_CALLER_AGENT_VERSION_KEY GEN_AI_CALLER_CLIENT_IP_KEY GEN_AI_CHOICE GEN_AI_CLIENT_OPERATION_DURATION_METRIC_NAME GEN_AI_CLIENT_TOKEN_USAGE_METRIC_NAME GEN_AI_CONVERSATION_ID_KEY GEN_AI_CONVERSATION_ITEM_LINK_KEY GEN_AI_EXECUTION_PAYLOAD_KEY GEN_AI_ICON_URI_KEY GEN_AI_INPUT_MESSAGES_KEY GEN_AI_OPERATION_NAME_KEY GEN_AI_OUTPUT_MESSAGES_KEY GEN_AI_PROVIDER_NAME_KEY GEN_AI_REQUEST_MAX_TOKENS_KEY GEN_AI_REQUEST_MODEL_KEY GEN_AI_REQUEST_TEMPERATURE_KEY GEN_AI_REQUEST_TOP_P_KEY GEN_AI_RESPONSE_FINISH_REASONS_KEY GEN_AI_RESPONSE_MODEL_KEY GEN_AI_SYSTEM_INSTRUCTIONS_KEY GEN_AI_TASK_ID_KEY GEN_AI_TOOL_ARGS_KEY GEN_AI_TOOL_CALL_ID_KEY GEN_AI_TOOL_CALL_RESULT_KEY GEN_AI_TOOL_DESCRIPTION_KEY GEN_AI_TOOL_NAME_KEY GEN_AI_TOOL_TYPE_KEY GEN_AI_USAGE_INPUT_TOKENS_KEY GEN_AI_USAGE_OUTPUT_TOKENS_KEY GUARDIAN_ID_KEY GUARDIAN_NAME_KEY GUARDIAN_PROVIDER_NAME_KEY GUARDIAN_VERSION_KEY INVOKE_AGENT_OPERATION_NAME OUTPUT_MESSAGES_OPERATION_NAME SECURITY_CONTENT_INPUT_HASH_KEY SECURITY_CONTENT_INPUT_VALUE_KEY SECURITY_CONTENT_MODIFIED_KEY SECURITY_CONTENT_OUTPUT_VALUE_KEY SECURITY_DECISION_CODE_KEY SECURITY_DECISION_REASON_KEY SECURITY_DECISION_TYPE_KEY SECURITY_EXTERNAL_EVENT_ID_KEY SECURITY_FINDING_EVENT_NAME SECURITY_POLICY_DECISION_TYPE_KEY SECURITY_POLICY_ID_KEY SECURITY_POLICY_NAME_KEY SECURITY_POLICY_VERSION_KEY SECURITY_RISK_CATEGORY_KEY SECURITY_RISK_METADATA_KEY SECURITY_RISK_SCORE_KEY SECURITY_RISK_SEVERITY_KEY SECURITY_TARGET_ID_KEY SECURITY_TARGET_TYPE_KEY SERVER_ADDRESS_KEY SERVER_PORT_KEY SERVICE_NAME_KEY SESSION_DESCRIPTION_KEY SESSION_ID_KEY SOURCE_NAME TELEMETRY_SDK_LANGUAGE_KEY TELEMETRY_SDK_LANGUAGE_VALUE TELEMETRY_SDK_NAME_KEY TELEMETRY_SDK_NAME_VALUE TELEMETRY_SDK_VERSION_KEY TELEMETRY_SDK_VERSION_VALUE TENANT_ID_KEY TRACE_CONTENTS_ENVIRONMENT_VARIABLE TRACE_CONTENTS_SWITCH USER_EMAIL_KEY USER_ID_KEY USER_NAME_KEY
    A365_MESSAGES_SCHEMA_VERSION_KEY: "microsoft.a365.messages.schema_version"

    Attribute key for the A365 messages schema version.

    AGENT_ID_KEY: "gen_ai.agent.id"

    Attribute key for the agent identifier (alias of GEN_AI_AGENT_ID_KEY).

    APPLY_GUARDRAIL_OPERATION_NAME: "apply_guardrail"

    Operation name used for guardrail-evaluation spans.

    AZ_NAMESPACE_KEY: "az.namespace"

    Attribute key for the Azure resource provider namespace (az.namespace).

    AZURE_RP_NAMESPACE_VALUE: "Microsoft.CognitiveServices"

    Azure resource provider namespace value for Cognitive Services.

    CHANNEL_LINK_KEY: "microsoft.channel.link"

    Attribute key for the channel link/description (microsoft.channel.link).

    CHANNEL_NAME_KEY: "microsoft.channel.name"

    Attribute key for the channel name (microsoft.channel.name).

    CHAT_OPERATION_NAME: "chat"

    Operation name used for model chat/inference spans.

    CUSTOM_PARENT_SPAN_ID_KEY: "custom.parent.span.id"

    Attribute key for a custom parent span identifier (custom.parent.span.id).

    CUSTOM_SPAN_NAME_KEY: "custom.span.name"

    Attribute key for a custom span name (custom.span.name).

    ENABLE_A365_OBSERVABILITY: "ENABLE_A365_OBSERVABILITY"

    Environment-variable name that enables A365 observability.

    ENABLE_A365_OBSERVABILITY_EXPORTER: "ENABLE_A365_OBSERVABILITY_EXPORTER"

    Environment-variable name that enables the A365 observability exporter.

    ENABLE_OBSERVABILITY: "ENABLE_OBSERVABILITY"

    Environment-variable name that enables observability.

    ENABLE_OPENTELEMETRY_SWITCH: "Azure.Experimental.EnableActivitySource"

    Feature-switch name that enables the experimental activity source.

    ERROR_MESSAGE_KEY: "error.message"

    Attribute key for a human-readable error message (error.message).

    ERROR_TYPE_CANCELLED: "TaskCanceledException"

    Error-type value used when an operation was cancelled.

    ERROR_TYPE_KEY: "error.type"

    Attribute key for the error type recorded on a span (error.type).

    EXECUTE_TOOL_OPERATION_NAME: "execute_tool"

    Operation name used for tool-execution spans.

    GEN_AI_AGENT_AUID_KEY: "microsoft.agent.user.id"

    Attribute/baggage key for the agentic user identifier (microsoft.agent.user.id).

    GEN_AI_AGENT_BLUEPRINT_ID_KEY: "microsoft.a365.agent.blueprint.id"

    Attribute/baggage key for the agent blueprint identifier (microsoft.a365.agent.blueprint.id).

    GEN_AI_AGENT_DESCRIPTION_KEY: "gen_ai.agent.description"

    Attribute key for the agent description (gen_ai.agent.description).

    GEN_AI_AGENT_EMAIL_KEY: "microsoft.agent.user.email"

    Attribute/baggage key for the agentic user email (microsoft.agent.user.email).

    GEN_AI_AGENT_ID_KEY: "gen_ai.agent.id"

    Attribute key for the agent identifier (gen_ai.agent.id).

    GEN_AI_AGENT_NAME_KEY: "gen_ai.agent.name"

    Attribute key for the agent display name (gen_ai.agent.name).

    GEN_AI_AGENT_PLATFORM_ID_KEY: "microsoft.a365.agent.platform.id"

    Attribute key for the agent platform identifier (microsoft.a365.agent.platform.id).

    GEN_AI_AGENT_THOUGHT_PROCESS_KEY: "microsoft.a365.agent.thought.process"

    Attribute key for the agent thought process (microsoft.a365.agent.thought.process).

    GEN_AI_AGENT_VERSION_KEY: "gen_ai.agent.version"

    Attribute key for the agent version (gen_ai.agent.version).

    GEN_AI_CALLER_AGENT_APPLICATION_ID_KEY: "microsoft.a365.caller.agent.blueprint.id"

    Attribute key for the calling agent's blueprint (application) identifier.

    GEN_AI_CALLER_AGENT_EMAIL_KEY: "microsoft.a365.caller.agent.user.email"

    Attribute key for the calling agent's agentic user email.

    GEN_AI_CALLER_AGENT_ID_KEY: "microsoft.a365.caller.agent.id"

    Attribute key for the calling agent's identifier.

    GEN_AI_CALLER_AGENT_NAME_KEY: "microsoft.a365.caller.agent.name"

    Attribute key for the calling agent's name.

    GEN_AI_CALLER_AGENT_PLATFORM_ID_KEY: "microsoft.a365.caller.agent.platform.id"

    Attribute key for the calling agent's platform identifier.

    GEN_AI_CALLER_AGENT_USER_ID_KEY: "microsoft.a365.caller.agent.user.id"

    Attribute key for the calling agent's agentic user identifier.

    GEN_AI_CALLER_AGENT_VERSION_KEY: "microsoft.a365.caller.agent.version"

    Attribute key for the calling agent's version.

    GEN_AI_CALLER_CLIENT_IP_KEY: "client.address"

    Attribute key for the caller client IP address (client.address).

    GEN_AI_CHOICE: "gen_ai.choice"

    Attribute key for a gen-ai choice (gen_ai.choice).

    GEN_AI_CLIENT_OPERATION_DURATION_METRIC_NAME: "gen_ai.client.operation.duration"

    Metric name for the gen-ai client operation duration.

    GEN_AI_CLIENT_TOKEN_USAGE_METRIC_NAME: "gen_ai.client.token.usage"

    Metric name for gen-ai client token usage.

    GEN_AI_CONVERSATION_ID_KEY: "gen_ai.conversation.id"

    Attribute key for the conversation identifier (gen_ai.conversation.id).

    GEN_AI_CONVERSATION_ITEM_LINK_KEY: "microsoft.conversation.item.link"

    Attribute key for the conversation item deep link (microsoft.conversation.item.link).

    GEN_AI_EXECUTION_PAYLOAD_KEY: "gen_ai.execution.payload"

    Attribute key for the execution payload (gen_ai.execution.payload).

    GEN_AI_ICON_URI_KEY: "gen_ai.agent365.icon_uri"

    Attribute key for the agent icon URI (gen_ai.agent365.icon_uri).

    GEN_AI_INPUT_MESSAGES_KEY: "gen_ai.input.messages"

    Attribute key for the serialized input messages (gen_ai.input.messages).

    GEN_AI_OPERATION_NAME_KEY: "gen_ai.operation.name"

    Attribute key for the gen-ai operation name (gen_ai.operation.name).

    GEN_AI_OUTPUT_MESSAGES_KEY: "gen_ai.output.messages"

    Attribute key for the serialized output messages (gen_ai.output.messages).

    GEN_AI_PROVIDER_NAME_KEY: "gen_ai.provider.name"

    Attribute key for the gen-ai provider name (gen_ai.provider.name).

    GEN_AI_REQUEST_MAX_TOKENS_KEY: "gen_ai.request.max_tokens"

    Attribute key for the requested maximum number of tokens (gen_ai.request.max_tokens).

    GEN_AI_REQUEST_MODEL_KEY: "gen_ai.request.model"

    Attribute key for the requested model name (gen_ai.request.model).

    GEN_AI_REQUEST_TEMPERATURE_KEY: "gen_ai.request.temperature"

    Attribute key for the sampling temperature (gen_ai.request.temperature).

    GEN_AI_REQUEST_TOP_P_KEY: "gen_ai.request.top_p"

    Attribute key for the nucleus-sampling top-p value (gen_ai.request.top_p).

    GEN_AI_RESPONSE_FINISH_REASONS_KEY: "gen_ai.response.finish_reasons"

    Attribute key for the finish reasons returned by the model (gen_ai.response.finish_reasons).

    GEN_AI_RESPONSE_MODEL_KEY: "gen_ai.response.model"

    Attribute key for the model that produced the response (gen_ai.response.model).

    GEN_AI_SYSTEM_INSTRUCTIONS_KEY: "gen_ai.system_instructions"

    Attribute key for the system instructions (gen_ai.system_instructions).

    GEN_AI_TASK_ID_KEY: "gen_ai.task.id"

    Attribute key for the task identifier (gen_ai.task.id).

    GEN_AI_TOOL_ARGS_KEY: "gen_ai.tool.call.arguments"

    Attribute key for the serialized tool-call arguments (gen_ai.tool.call.arguments).

    GEN_AI_TOOL_CALL_ID_KEY: "gen_ai.tool.call.id"

    Attribute key for the tool-call identifier (gen_ai.tool.call.id).

    GEN_AI_TOOL_CALL_RESULT_KEY: "gen_ai.tool.call.result"

    Attribute key for the tool-call result (gen_ai.tool.call.result).

    GEN_AI_TOOL_DESCRIPTION_KEY: "gen_ai.tool.description"

    Attribute key for the tool description (gen_ai.tool.description).

    GEN_AI_TOOL_NAME_KEY: "gen_ai.tool.name"

    Attribute key for the tool name (gen_ai.tool.name).

    GEN_AI_TOOL_TYPE_KEY: "gen_ai.tool.type"

    Attribute key for the tool type (gen_ai.tool.type).

    GEN_AI_USAGE_INPUT_TOKENS_KEY: "gen_ai.usage.input_tokens"

    Attribute key for the number of input (prompt) tokens (gen_ai.usage.input_tokens).

    GEN_AI_USAGE_OUTPUT_TOKENS_KEY: "gen_ai.usage.output_tokens"

    Attribute key for the number of output (completion) tokens (gen_ai.usage.output_tokens).

    GUARDIAN_ID_KEY: "microsoft.guardian.id"

    Attribute key for the guardian identifier (microsoft.guardian.id).

    GUARDIAN_NAME_KEY: "microsoft.guardian.name"

    Attribute key for the guardian name (microsoft.guardian.name).

    GUARDIAN_PROVIDER_NAME_KEY: "microsoft.guardian.provider.name"

    Attribute key for the guardian provider name (microsoft.guardian.provider.name).

    GUARDIAN_VERSION_KEY: "microsoft.guardian.version"

    Attribute key for the guardian version (microsoft.guardian.version).

    INVOKE_AGENT_OPERATION_NAME: "invoke_agent"

    Operation name (gen_ai.operation.name) used for agent invocation spans.

    OUTPUT_MESSAGES_OPERATION_NAME: "output_messages"

    Operation name used for output-message spans.

    SECURITY_CONTENT_INPUT_HASH_KEY: "microsoft.security.content.input.hash"

    Attribute key for the hash of guarded input content (microsoft.security.content.input.hash).

    SECURITY_CONTENT_INPUT_VALUE_KEY: "microsoft.security.content.input.value"

    Attribute key for the guarded input content value (microsoft.security.content.input.value).

    SECURITY_CONTENT_MODIFIED_KEY: "microsoft.security.content.modified"

    Attribute key indicating whether guarded content was modified (microsoft.security.content.modified).

    SECURITY_CONTENT_OUTPUT_VALUE_KEY: "microsoft.security.content.output.value"

    Attribute key for the guarded output content value (microsoft.security.content.output.value).

    SECURITY_DECISION_CODE_KEY: "microsoft.security.decision.code"

    Attribute key for the guardrail decision code (microsoft.security.decision.code).

    SECURITY_DECISION_REASON_KEY: "microsoft.security.decision.reason"

    Attribute key for the guardrail decision reason (microsoft.security.decision.reason).

    SECURITY_DECISION_TYPE_KEY: "microsoft.security.decision.type"

    Attribute key for the guardrail decision type (microsoft.security.decision.type).

    SECURITY_EXTERNAL_EVENT_ID_KEY: "microsoft.security.external_event_id"

    Attribute key for an external correlation identifier for SIEM systems (microsoft.security.external_event_id).

    SECURITY_FINDING_EVENT_NAME: "microsoft.security.finding"

    Event name emitted for a security finding (microsoft.security.finding).

    SECURITY_POLICY_DECISION_TYPE_KEY: "microsoft.security.policy.decision.type"

    Attribute key for the security policy decision type (microsoft.security.policy.decision.type).

    SECURITY_POLICY_ID_KEY: "microsoft.security.policy.id"

    Attribute key for the security policy identifier (microsoft.security.policy.id).

    SECURITY_POLICY_NAME_KEY: "microsoft.security.policy.name"

    Attribute key for the security policy name (microsoft.security.policy.name).

    SECURITY_POLICY_VERSION_KEY: "microsoft.security.policy.version"

    Attribute key for the security policy version (microsoft.security.policy.version).

    SECURITY_RISK_CATEGORY_KEY: "microsoft.security.risk.category"

    Attribute key for the detected risk category (microsoft.security.risk.category).

    SECURITY_RISK_METADATA_KEY: "microsoft.security.risk.metadata"

    Attribute key for non-content risk metadata (microsoft.security.risk.metadata).

    SECURITY_RISK_SCORE_KEY: "microsoft.security.risk.score"

    Attribute key for the numeric risk score (microsoft.security.risk.score).

    SECURITY_RISK_SEVERITY_KEY: "microsoft.security.risk.severity"

    Attribute key for the detected risk severity (microsoft.security.risk.severity).

    SECURITY_TARGET_ID_KEY: "microsoft.security.target.id"

    Attribute key for the guardrail target identifier (microsoft.security.target.id).

    SECURITY_TARGET_TYPE_KEY: "microsoft.security.target.type"

    Attribute key for the guardrail target type (microsoft.security.target.type).

    SERVER_ADDRESS_KEY: "server.address"

    Attribute key for the destination server host name (server.address).

    SERVER_PORT_KEY: "server.port"

    Attribute key for the destination server port (server.port).

    SERVICE_NAME_KEY: "service.name"

    Attribute key for the service name (service.name).

    SESSION_DESCRIPTION_KEY: "microsoft.session.description"

    Attribute key for the session description (microsoft.session.description).

    SESSION_ID_KEY: "microsoft.session.id"

    Attribute key for the session identifier (microsoft.session.id).

    SOURCE_NAME: "Agent365Sdk"

    Tracer/instrumentation-scope name used for all A365 spans.

    TELEMETRY_SDK_LANGUAGE_KEY: "telemetry.sdk.language"

    Attribute key for the telemetry SDK language (telemetry.sdk.language).

    TELEMETRY_SDK_LANGUAGE_VALUE: "nodejs"

    Telemetry SDK language value reported by this distro.

    TELEMETRY_SDK_NAME_KEY: "telemetry.sdk.name"

    Attribute key for the telemetry SDK name (telemetry.sdk.name).

    TELEMETRY_SDK_NAME_VALUE: "microsoft-opentelemetry"

    Telemetry SDK name value reported by this distro.

    TELEMETRY_SDK_VERSION_KEY: "telemetry.sdk.version"

    Attribute key for the telemetry SDK version (telemetry.sdk.version).

    TELEMETRY_SDK_VERSION_VALUE: "1.3.0" = MICROSOFT_OPENTELEMETRY_VERSION

    Telemetry SDK version value reported by this distro.

    TENANT_ID_KEY: "microsoft.tenant.id"

    Attribute key for the tenant identifier (microsoft.tenant.id).

    TRACE_CONTENTS_ENVIRONMENT_VARIABLE: "AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED"

    Environment-variable name that enables recording of gen-ai message content.

    TRACE_CONTENTS_SWITCH: "Azure.Experimental.TraceGenAIMessageContent"

    Feature-switch name that enables tracing of gen-ai message content.

    USER_EMAIL_KEY: "user.email"

    Attribute key for the user email address (user.email).

    USER_ID_KEY: "user.id"

    Attribute key for the user identifier (user.id).

    USER_NAME_KEY: "user.name"

    Attribute key for the user display name (user.name).