Agent-skills observability-edot-dotnet-migrate
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-migrate" ~/.claude/skills/elastic-agent-skills-observability-edot-dotnet-migrate && rm -rf "$T"
manifest:
skills/observability/edot-dotnet-migrate/SKILL.mdsource content
EDOT .NET Migration
Read the migration guide before making changes:
Guidelines
- Remove ALL classic APM references:
NuGet packages (includingElastic.Apm.*
),Elastic.Apm.NetCoreAll
/UseAllElasticApm()
calls, theAddAllElasticApm()
section fromElasticApm
, and allappsettings.json
env varsELASTIC_APM_* - 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:
(replacesOTEL_SERVICE_NAME
/ELASTIC_APM_SERVICE_NAME
)ElasticApm:ServiceName
— must be the managed OTLP endpoint or EDOT Collector URL. Do NOT reuse the oldOTEL_EXPORTER_OTLP_ENDPOINT
value. Never use an APM Server URL (noELASTIC_APM_SERVER_URLS
, noapm-server
, no:8200
)/intake/v2/events
—OTEL_EXPORTER_OTLP_HEADERS
or"Authorization=ApiKey <key>"
(replaces"Authorization=Bearer <token>"
)ELASTIC_APM_SECRET_TOKEN
- Do NOT set
,OTEL_TRACES_EXPORTER
, orOTEL_METRICS_EXPORTER
— the defaults are already correctOTEL_LOGS_EXPORTER - Never run both classic Elastic APM agent (
) and EDOT on the same applicationElastic.Apm.*
Examples
See the EDOT .NET migration guide for complete examples.