OpenTelemetry Service Names
When sending spans to the organization endpoint, you need to tell Insight Hub which project the spans should be assigned to. You do this by making use of the service.name
resource attribute. The service.name
attribute is required and spans will be rejected if they do not have it set. It can be set in a platform specific way, or usually with the OTEL_SERVICE_NAME
environment variable.
To assign service names to projects, go to the Performance > OpenTelemetry service names in the organization settings on your dashboard.
If your project names usually or sometimes line up with your service names, these can be mapped automatically by enabling “Match Service Name to project name by default”.
For those service names that do not map to a project name, or if you prefer not to use this setting, you can create explicit maps from service names to particular projects in the lower section of the settings page. If there is an explicit mapping here, it will take precedence over any matching project name.
Adding a mapping only affects subsequent spans; already-ingested spans will not be assigned or reassigned to a project.
Spans that are not mapped to projects will show up in distributed trace maps and waterfall diagrams with a “disconnected” icon.
Client-side SDKs
For client-side performance monitoring, we usually recommend configuring a project-level API key, and sending the spans directly, rather than a Collector. Doing this means InsightHub manages the sample rate for you to meet your managed quota. However if you choose to send your client-side spans to a Collector, the spans will need to be mapped via service name. The Insight Hub SDKs set service.name
by default (to the app identifier, where available, or to unknown_service
). To override this, set the serviceName
configuration item in the SDK.