Glossary
Telemetry initializer
A hook in the classic Application Insights SDK that runs on every telemetry item before it is sent, used to add or correct properties such as the cloud role name, user ID or a custom dimension.
In the classic .NET SDK (2.x), a telemetry initializer is a class implementing ITelemetryInitializer. Its Initialize(ITelemetry telemetry) method is called for each request, dependency, exception, trace and event, and it typically sets values on telemetry.Context or adds entries to the item’s properties. Initializers enrich; to drop items the SDK uses a separate concept, the telemetry processor.
Application Insights .NET SDK 3.x and the OpenTelemetry distros no longer run telemetry initializers. Microsoft’s migration guidance replaces them with OpenTelemetry mechanisms: resource attributes for values that describe the whole service (such as the role name), and span or log record processors for per-item enrichment. In the Node.js distro, processors are registered through the spanProcessors and logRecordProcessors options.
When you migrate an initializer, decide first whether its value is per-service or per-item; per-service values belong in the resource, where they cost nothing per item.