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

[Do not merge] Agent api prototype #624

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

LikeTheSalad
Copy link
Contributor

@LikeTheSalad LikeTheSalad commented Oct 8, 2024

Prototype that should cover what's being discussed here.

  • A Kotlin factory method that returns OpenTelemetryRumBuilder, which to me it seems to be the simplest way of using the agent as there's only one method that users would need to be aware of. It also contains config params for the default instrumentations.
  • Following the diagram, it removes some API surface from OpenTelemetryRumBuilder.
  • Following the diagram, It moves the "unserializable" config params from OtelRumConfig into OpenTelemetryRumBuilder.
  • Following the diagram (kind of, as the interface initially named SessionManager is now changed to SessionProvider Session handling implementation opentelemetry-js-contrib#2358) it sets the SessionProvider as the only session-related type in core, and moves all of our session-related types to the agent so that the existing session handling tools (the ones that create sessions based on a timeout) are provided by the agent, and "power-users" can provide their own session handling logic directly to core, if needed.
  • Following the diagram, it creates EndpointConfig and a default impl that provides HTTP endpoints.
  • Adds the OTLP exporters dependency to the agent module and makes the agent to automatically set otlp-http span and log exporters that use the provided endpoint config params.
    Here we can see how this agent API is used in our demo app.

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

Successfully merging this pull request may close these issues.

1 participant