• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

Group Lambda functions under a single OTel entity

When you instrument Lambda functions with an OpenTelemetry (OTel) layer, the OTEL_SERVICE_NAME environment variable controls which entity your function's telemetry is attributed to in New Relic. By default each function reports as a separate entity. Setting the same OTEL_SERVICE_NAME on multiple functions groups all of their telemetry under a single entity.

No application code changes are required. The OTel Lambda layer handles instrumentation automatically — you only configure the environment variables that control where the data goes.

Prerequisites

Set the OTel entity name

Set OTEL_SERVICE_NAME as a Lambda environment variable:

OTEL_SERVICE_NAME = my-service-name

All telemetry from that function is attributed to an OTel entity named my-service-name in New Relic. If no entity with that name exists, one is created automatically.

重要

OTEL_SERVICE_NAME is not permanent. If you update the value and redeploy, the function begins reporting under the new entity name from that point forward. New Relic does not migrate prior history — the old entity retains its data but stops receiving new telemetry.

Group Lambda functions under a single entity

To group two or more Lambda functions under a single OTel entity, give every function the same OTEL_SERVICE_NAME value. That is the only configuration required.

# Function A (us-east-1)
OTEL_SERVICE_NAME = payment-service
# Function B (eu-west-1)
OTEL_SERVICE_NAME = payment-service

Both functions now report into a single payment-service entity in New Relic.

Entity behavior

Functions sharing the same OTEL_SERVICE_NAME value and New Relic account are grouped under a single OTel entity in the New Relic UI.

重要

Changing OTEL_SERVICE_NAME creates a new OTel entity. Historical data associated with the previous name is not migrated to the new entity.

Multi-region reporting

Multiple Lambda functions deployed across different AWS regions can share the same OTEL_SERVICE_NAME. All of these functions report into a single OTel entity, regardless of which region they are deployed in.

To distinguish individual functions or region-specific deployments within the grouped entity, filter by the tags.aws.arn attribute in NRQL or use the tag filter bar in the entity view.

Cross-runtime reporting

Lambda functions using different runtimes (for example, a Python function and a Node.js function) that share the same OTEL_SERVICE_NAME create separate OTel entities — one per runtime. The grouping does not cross runtime boundaries. This is expected OTel behavior — entity identity includes the language type, not just the service name.

Entity name changes

Scenario

Result

Set OTEL_SERVICE_NAME for the first time

New entity created; telemetry flows into it immediately

Update OTEL_SERVICE_NAME and redeploy

New entity created for the new name; old entity retains history but stops receiving telemetry

Remove OTEL_SERVICE_NAME

Function reverts to reporting under the Lambda function name (AWS_LAMBDA_FUNCTION_NAME)

Preserve faas.name in collector processors

注意

faas.name is auto-populated for Lambda by the OTel layer — do not drop it (delete or rename it). New Relic uses it to recognize the parent (SERVER) span as a Lambda invocation. Dropping it causes:

  • The parent span to be excluded from metric synthesis
  • Incomplete or incorrect transaction counts
  • The entity resolving as EXT|SERVICE instead of a Lambda entity — breaking the group-by feature and cloud.resource_id tagging and filtering
Copyright © 2026 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.