open-telemetry / open-telemetry/opentelemetry-java

The ContextStorageProvider system prop and error message differ

Open
#7,318 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
Java
Stars
2.5k
Forks
1k
Avg merge
3d 17h
Merged PRs (30d)
58

Description

Inside of context/src/main/java/io/opentelemetry/context/LazyStorage.java, the io.opentelemetry.context.contextStorageProvider system property is checked for providers.
However, in the IllegalStateExceptions thrown further down in the class, error messages mention the io.opentelemetry.context.ContextStorageProvider property instead (with an uppercase "C" for ContextStorageProvider).

I'm a little bit out of my depth here regarding system property naming, so I'm not sure which one is correct and which one is a typo though

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 reading context/src/main/java/io/opentelemetry/context/LazyStorage.java, comparing the system property name used for provider lookup with the names in the IllegalStateException messages. Check nearby project conventions or tests to determine the intended capitalization. Done means the property name is used consistently and the relevant context tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.