open-telemetry / open-telemetry/opentelemetry-java
Create resource from environment
Open
Nobody has claimed this yet.
Feature Request
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 58
Description
Related to #5554, we can create resource attributes from Environment
If we otel.resource.attributes like this: key1=value1,key2={ENV2:defaultValue}
can we get actually value from the following steps:
- if the attribute value not contains
{, return the value directly - if the attribute value contains
{, find attribute value key (ENV2) and get value from system env or system properties, return value if not null - if system env or system properties do not have this key return default value
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 with the resource-attribute creation work related to #5554 and trace handling of otel.resource.attributes. Verify the behavior against the three stated cases: literal values, system environment or property lookup, and default values when the key is absent. Done means each case produces the specified attribute value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100