Skip to content

Do not apply toLowerHyphen to span name in Default TracingObservationHandler #1092

@bioplasticlining

Description

@bioplasticlining

The default behaviour when I set a contextualName with an uppercase letter is that some weird sort of hyphen-lowercasing is applied, where Hello may become -hello. The responsible code is located here.

default String getSpanName(T context) {
    String name = context.getName();
    if (StringUtils.isNotBlank(context.getContextualName())) {
        name = context.getContextualName();
    }
    return SpanNameUtil.toLowerHyphen(name);
}

This seems like undesirable behaviour from a default handler, ideally the expected behaviour is that supplied casing is respected in emitted spans. PropagatingReceiverTracingObservationHandler etc. already seems to handle this correctly.

We've tried to find a reason in the Micrometer Slack, this is a follow up from this discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions