Skip to content

Commit 26e4b29

Browse files
committed
Restore javadoc on EnvironmentResource.createEnvironmentResource
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 014e7c6 commit 26e4b29

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/EnvironmentResource.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ final class EnvironmentResource {
2626
static final String ATTRIBUTE_PROPERTY = "otel.resource.attributes";
2727
static final String SERVICE_NAME_PROPERTY = "otel.service.name";
2828

29+
/**
30+
* Create a {@link Resource} from the environment. The resource contains attributes parsed from
31+
* environment variables and system property keys {@code otel.resource.attributes} and {@code
32+
* otel.service.name}.
33+
*
34+
* @param config the {@link ConfigProperties} used to obtain resource properties
35+
* @return the resource.
36+
*/
2937
@SuppressWarnings("JdkObsolete") // Recommended alternative was introduced in java 10
3038
static Resource createEnvironmentResource(ConfigProperties config) {
3139
AttributesBuilder resourceAttributes = Attributes.builder();

0 commit comments

Comments
 (0)