open-telemetry / open-telemetry/opentelemetry-java-instrumentation

CodeSpanNameExtractor doesn't produce low-cardinality span names for auto-generated class names

Open
#6,595 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
2.6k
Forks
1.2k
Avg merge
2d 18h
Merged PRs (30d)
228

Description

We handle lambdas now (#6584), but there can be other auto-generated class names.

From @laurit's https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/6584#pullrequestreview-1104250758

Lambdas aren't the only ones with the same issue, see https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/3813 Maybe we should truncate after $$ as it is commonly used in generated class names? Though probably should not do this for $$anon$ which is used in some scala classes. JDK proxies don't use $$ and would need to be handled separately.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting CodeSpanNameExtractor, then read issue 3813 and the discussion in PR 6584. Determine how auto-generated class names, Scala $$anon$ names, and JDK proxies should be handled, and define completion around producing low-cardinality span names without breaking the named exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.