elastic / elastic/elastic-otel-java

Infer service name and set it at startup

Open
#321 3 comments 0 reactions 0 assignees View on GitHub
agent-java
Dominant language
Java
Stars
35
Forks
32
Avg merge
1d 8h
Merged PRs (30d)
30

Description

## Is your feature request related to a problem?
If service name is not explicitly set (using the [two options](https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_service_name)) then there is a generic default `unknown_service`. This is not useful for auto-instrumentation

## Describe the solution you'd like
The service name should be inferred as best as possible, if some property is set to true (eg OTEL_ELASTIC_AUTO_SERVICE_NAME=true).

## Describe alternatives you've considered
Suggestions welcome

## Additional context
While in most cases you can ask the user to set the service name explicitly - which is best practice - in the case of [zero-code configuration](https://opentelemetry.io/docs/zero-code/java/) this would add additional per deployment configuration which is not the optimal experience

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.