Skip to content

Add a namespaced tag (executor.name) to ExecutorServiceMetrics to avoid collisions with generic name tag #7310

@evg-tso

Description

@evg-tso

Please describe the feature request.
ExecutorServiceMetrics (and TimedExecutor, TimedExecutorService, TimedScheduledExecutorService) all use "name" as the tag key for identifying the executor pool.
From here:

this.tags = Tags.concat(tags, "name", executorServiceName);

I'd like Micrometer to also emit a more specific tag like executor.name or pool.name alongside the existing name tag.

Rationale
name is a very generic tag key. In our setup we use Micrometer for executor metrics but bridge them to OpenTelemetry via the micrometer-1.5 instrumentation library and export through an OTEL Collector. Somewhere along that pipeline, a name attribute gets injected with different semantics (maybe by one of the collector's processors or resource detectors), and it collides with Micrometer's name tag on the executor metrics. This makes it hard to query by pool name without adding custom relabeling workarounds.

OpenTelemetry's naming guidelines recommend namespacing attributes to avoid exactly this. A tag like executor.name would be specific enough to not clash with anything.

The existing name tag should stay for backward compatibility. The new one would just be an additional, unambiguous alternative.

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions