Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTelemetry Agent #154

Open
dalexandrov opened this issue Jan 23, 2024 · 2 comments
Open

OpenTelemetry Agent #154

dalexandrov opened this issue Jan 23, 2024 · 2 comments
Milestone

Comments

@dalexandrov
Copy link

Currently, the specification mentions that MP Telemetry should work without issues with the Otel Metrics Agent.
But this brings a lot of undefined behaviour.

If the agent is present there is practically no control on how the agent was set up, are the properties specified in the MP config applied etc.

The section in the specification should be extended providing more details on how to detect if the agent is present and how to behave if the agent is present.

Should the configuration be ignored and all the control be offloaded to the agent, or not?
Should there be a specific property telling that the agent is present and no further setup and config should be done at init, to skip the undefined behaviour.

@pdudits
Copy link
Contributor

pdudits commented Jan 25, 2024

Looking at current behaviour of opentelemetry:

  • SDK will only configure itself, when property otel.java.global-autoconfigure.enabled is true. (relevant snippet)
  • Agent will completely override GlobalOpenTelemetry methods. (relevant snippet)

But in both cases this only affects GlobalOpenTelemetry and the global one is what agent would use. In my opinion (but cannot back it with experience yet), as long as implementations use different source of OpenTelemetry implementation, these two can coexist, though I sense some trouble with context propagation.

It would be good if other members would share their experiences here so we are aware of cases we need to handle.

Should the configuration be ignored and all the control be offloaded to the agent, or not?

Since there is no stable API to verify that, it would be hard to keep this guarantee across different agent versions.

Should there be a specific property telling that the agent is present and no further setup and config should be done at init, to skip the undefined behaviour.

Having otel.sdk.disabled=false in the config is not necessary for agent to work, but is required for initialization of MP Telemetry. Omitting it would leave all the work to agent, but would also take away any guarantees provides.

Explicit config property requirement could look like this:

If config property mp.telemetry.useGlobalOpenTelemetry has value of true, the implementation SHOULD NOT attempt to configure application-specific OpenTelemetry instance, rather use GlobalOpenTelemetry.get(). This serves the cases when Open Telemetry is configured by other means, i. e. use of Java Agent.

@Emily-Jiang
Copy link
Member

@dalexandrov will create a PR

@Emily-Jiang Emily-Jiang added this to the 2.0 milestone Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants