Agent-skills observability-edot-dotnet-instrument
install
source · Clone the upstream repo
git clone https://github.com/elastic/agent-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/elastic/agent-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/observability/edot-dotnet-instrument" ~/.claude/skills/elastic-agent-skills-observability-edot-dotnet-instrument && rm -rf "$T"
manifest:
skills/observability/edot-dotnet-instrument/SKILL.mdsource content
EDOT .NET Instrumentation
Read the setup guide before making changes:
Guidelines
- Add NuGet packages:
andElastic.OpenTelemetry
(for ASP.NET Core apps)OpenTelemetry.Instrumentation.AspNetCore - Register EDOT in startup: call
on thebuilder.AddElasticOpenTelemetry()
(inIHostApplicationBuilder
or equivalent). Without this, no telemetry is collectedProgram.cs - Set exactly three required environment variables:
OTEL_SERVICE_NAME
— must be the managed OTLP endpoint or EDOT Collector URL. Never use an APM Server URL (noOTEL_EXPORTER_OTLP_ENDPOINT
, noapm-server
, no:8200
)/intake/v2/events
—OTEL_EXPORTER_OTLP_HEADERS
or"Authorization=ApiKey <key>""Authorization=Bearer <token>"
- Do NOT set
,OTEL_TRACES_EXPORTER
, orOTEL_METRICS_EXPORTER
— the defaults are already correctOTEL_LOGS_EXPORTER - Do NOT manually configure
orTracerProvider
—MeterProvider
handles everythingAddElasticOpenTelemetry() - Never run both classic Elastic APM agent (
) and EDOT on the same applicationElastic.Apm.*
Examples
See the EDOT .NET setup guide for complete examples.