Skip to content

Move Session Config up#959

Merged
breedx-splk merged 2 commits into
open-telemetry:mainfrom
MdNaushad:move-session-config
Apr 23, 2025
Merged

Move Session Config up#959
breedx-splk merged 2 commits into
open-telemetry:mainfrom
MdNaushad:move-session-config

Conversation

@MdNaushad
Copy link
Copy Markdown
Contributor

@MdNaushad MdNaushad commented Apr 21, 2025

  • When we are using opentelemetry-android in a app and want to configure the SessionConfig, it gives error.
    Unresolved reference: SessionConfig.
  • It looks like SessionConfig is declared inside session/src/main/kotlin/io/opentelemetry/android/session/SessionConfig.kt
  • When opentelemetry-android is built, it doesn't expose the sessionConfig out for the child projects to use.

More info :

@MdNaushad MdNaushad requested a review from a team as a code owner April 21, 2025 15:57
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 21, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@breedx-splk
Copy link
Copy Markdown
Contributor

@MdNaushad it looks like tis PR simply moves the SessionConfig class out of the session module and into the config package of the core module. Is that right?

I'm not convinced that we should do this -- the session related stuff is currently all grouped together in the session module, and this starts to change that. I do understand that it's a little bit confusing...but I think the current way that you can solve this is to include a dependency on io.opentelemetry.android:session. Let us know if that works for you.

@MdNaushad
Copy link
Copy Markdown
Contributor Author

@MdNaushad it looks like tis PR simply moves the SessionConfig class out of the session module and into the config package of the core module. Is that right?

I'm not convinced that we should do this -- the session related stuff is currently all grouped together in the session module, and this starts to change that. I do understand that it's a little bit confusing...but I think the current way that you can solve this is to include a dependency on io.opentelemetry.android:session. Let us know if that works for you.

Yes, it's simply moving the class.
I am thinking from user's perspective. If I want to just configure session timeout or background activity time out, I would need to explicitly add a dependency on io.opentelemetry.android:session even though I am not using anything out of it.

If we want to keep SessionConfig inside the session module, I believe may be we can have methods on OtelRumConfig like
OtelRumConfig.setBackgroundActivityTimeout
OtelRumConfig.setMaxLifeTimeout

This way user won't have to add dependency on session module. Let me know your thoughts

@breedx-splk
Copy link
Copy Markdown
Contributor

@MdNaushad Ok that's cool...we may just want to move the other config(s) into a common place as well.
I've added an item for the SIG meeting tomorrow to discuss unless people chime in here first. :)

Regardless, you'll need to sign the CLA before we can accept the PR. Thanks so much!

Copy link
Copy Markdown
Contributor

@LikeTheSalad LikeTheSalad left a comment

Choose a reason for hiding this comment

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

Thank you 🙏

@breedx-splk breedx-splk merged commit 0e672e8 into open-telemetry:main Apr 23, 2025
6 checks passed
@MdNaushad MdNaushad deleted the move-session-config branch June 14, 2025 15:25
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.

4 participants