open-telemetry / open-telemetry/opentelemetry-java
More implementation for io.opentelemetry.api.common.AttributeKey
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 58
Description
Currently, we have only one implementation io.opentelemetry.api.internal.InternalAttributeKeyImpl for io.opentelemetry.api.common.AttributeKey, and we may have more implementation for that, for example:
- Make the all attributes in
io.opentelemetry.semconv.trace.attributes.SemanticAttributesSemanticAttributeImpl
public class SemanticAttributeImpl<T> implements AttributeKey<T> {}
- Make the SemanticAttributes that can be recored into metrics MetricsSemanticAttributes
public class MetricsSemanticAttributes<T> extends SemanticAttributeImpl {}
- Make the other attributes CustomAttributeImpl
If AttributeKey is classified, we can do a lot of performance optimisation. For example, we can filter out MetricsAttributes of SemanticAttributes by just calling xx.getclass().equals(MetricsAttributes) instead of traversing it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading io.opentelemetry.api.common.AttributeKey, io.opentelemetry.api.internal.InternalAttributeKeyImpl, and io.opentelemetry.semconv.trace.attributes.SemanticAttributes. Clarify the proposed classification of semantic, metrics, and custom attributes, then determine the expected performance behavior and validation needed for the new implementations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100