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

Relax install arg from OpenTelemetryRum to OpenTelemetry instance. #661

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

breedx-splk
Copy link
Contributor

As @surbhiia described in #658, there is an unnecessary tight coupling from the AndroidInstrumentation implementations back to the core module. Literally every one of the instrumentations was taking the rum instance only so that it could get access to the otel instance.

So let's simplify this and have fewer law-of-demeter violations! This changes the install() API to take the OpenTelemetry instance directly.

@breedx-splk breedx-splk requested a review from a team as a code owner October 24, 2024 22:42
Copy link
Contributor

@surbhiia surbhiia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! It looks great :)

(I noticed the volley http README mentions usage of OpenTelemetryRum as well, we can mention a line there saying users can bypass it and use their own OpenTelemetry instance as well)

Copy link
Contributor

@bidetofevil bidetofevil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Some of the instrumentation may also not need to entire OpenTelemetry object, so in the future, it may be good to narrow the scope of what they need to further narrow this (e.g. just pass in the TracerProvider or something)

@breedx-splk
Copy link
Contributor Author

LGTM.

Some of the instrumentation may also not need to entire OpenTelemetry object, so in the future, it may be good to narrow the scope of what they need to further narrow this (e.g. just pass in the TracerProvider or something)

Yup, totally agree that keeping dependencies minimal is the way to go.

@breedx-splk breedx-splk merged commit 2a027dd into open-telemetry:main Oct 29, 2024
3 checks passed
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.

3 participants