open-telemetry / open-telemetry/opentelemetry-java

Create resource from environment

Open
#5,575 2 comments 0 reactions 0 assignees View on GitHub

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:

  1. if the attribute value not contains {, return the value directly
  2. if the attribute value contains {, find attribute value key (ENV2) and get value from system env or system properties, return value if not null
  3. if system env or system properties do not have this key return default value

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.