Skip to content

Allow configuring service_name in tracing via EnvoyProxy spec #6535

@fboula

Description

@fboula

Description

I would like to be able to configure the service_name used in Envoy’s tracing configuration (e.g., for Datadog or OpenTelemetry) directly through the EnvoyProxy spec, in particular in the spec.telemetry.tracing section.

Currently, while I can define the tracing provider (Datadog, OpenTelemetry, etc.), I cannot set the service_name, which is a key parameter when integrating with APM platforms like Datadog.

Proposed syntax:

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
  name: custom-proxy
  namespace: envoy-gateway-system
spec:
  telemetry:
    tracing:
      provider:
        type: Datadog
        backendRefs:
          - name: datadog-agent
            port: 8126
            namespace: monitoring
        serviceName: custom-proxy

Why is this needed?

It is a common requirement when using Datadog or other APM providers to control the service_name field so that spans are properly grouped and searchable.

Current patching methods are insufficient

Since EnvoyPatchPolicy only supports a limited set of resource types (e.g. Listener, RouteConfiguration, Cluster, Secret, etc.), it is not possible to target:

"type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"

This means there is no supported way to patch or override the service_name field inside the tracing configuration of the HttpConnectionManager filter using standard mechanisms.

Acceptance Criteria

  • A serviceName field is supported under spec.telemetry.tracing.provider.
  • The field maps to the appropriate typed_config.service_name field inside Envoy's DatadogConfig or equivalent.
  • If serviceName is not set, Envoy should fall back to its default behavior.

References

Thank you for your work on Envoy Gateway.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions