Edit

Validate Microsoft OpenTelemetry Distro locally

Use local validation to confirm that the application produces telemetry before you validate a product-specific destination.

Local validation confirms that the application produces telemetry before a product-specific destination is validated. Use console output or a local OTLP endpoint to check that traces, metrics, and logs are created.

Validate with a local OTLP endpoint

Configure the Distro to send telemetry to a local collector or another OTLP-compatible endpoint.

export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
from microsoft.opentelemetry import use_microsoft_opentelemetry

use_microsoft_opentelemetry()

Validate with local output

Use local output when you want to confirm instrumentation before sending telemetry to a remote destination.

export ENABLE_A365_OBSERVABILITY_EXPORTER=false
from microsoft.opentelemetry import use_microsoft_opentelemetry

def token_resolver(agent_id, tenant_id):
    return "local-validation-token"

use_microsoft_opentelemetry(
    enable_a365=True,
    a365_token_resolver=token_resolver,
)

# Run instrumented application code.

Review the local output for spans from expected sources, such as HTTP requests, OpenAI or Azure OpenAI calls, agent invocation scopes, tool execution scopes, or inference scopes. Destination-specific validation belongs in the product documentation for that destination.

Next steps