Skip to content

Conversation

@RiyazurRazak
Copy link
Contributor

Resolves #932

@RiyazurRazak RiyazurRazak requested a review from a team as a code owner October 23, 2025 11:14
@RiyazurRazak
Copy link
Contributor Author

RiyazurRazak commented Oct 23, 2025

  • Api Dump
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 61.53846% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.02%. Comparing base (d27f9a4) to head (8e0574e).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
.../instrumentation/ScreenOrientationConfiguration.kt 0.00% 8 Missing ⚠️
...sl/instrumentation/InstrumentationConfiguration.kt 25.00% 3 Missing ⚠️
...ion/screenorientation/ScreenOrientationDetector.kt 80.00% 2 Missing and 1 partial ⚠️
...eenorientation/ScreenOrientationInstrumentation.kt 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@ ## main #1333 +/- ## ========================================== - Coverage 64.12% 64.02% -0.10%  ========================================== Files 154 157 +3 Lines 3063 3099 +36 Branches 316 318 +2 ========================================== + Hits 1964 1984 +20  - Misses 1009 1022 +13  - Partials 90 93 +3 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

@RiyazurRazak thanks for the PR! It's exciting to see the instrumentation coverage expanding like this!

I want to request two changes:

First, can we remove the additional extractors? I know you're following a pattern that seems to exist elsewhere, but I think those other cases have specific uses in mind. In the case here, the Orientation class only has one field (value), so there is really no use case to having additional extractors (there's basically nothing they can do).

Second, let's work on tweaking the shape of the event. I think we should remove the body text entirely (it is redundant), and we should add an attribute that contains the orientation. Because I think there is not yet semantic convention for this, we have some wiggle room, but something like screen.orientation might be a reasonable starting key, and the value should be a string (portrait or landscape) because other systems (ios, web) may not have the same constants available, and it's more useful to have the strings.

There's also some merge conflicts that will need resolving/rebasing.

Thanks again!

@RiyazurRazak
Copy link
Contributor Author

Thanks for the feedback, @breedx-splk. I’ll update the Event structure accordingly and remove the extractors.

# Conflicts: #	android-agent/src/main/kotlin/io/opentelemetry/android/agent/dsl/instrumentation/InstrumentationConfiguration.kt
Copy link
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 for your contribution! I think it's a great start, I just left a couple of comments.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need this file.

}

override fun uninstall(ctx: InstallationContext) {
if (!::detector.isInitialized) return
Copy link
Contributor

Choose a reason for hiding this comment

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

If we need to check whether some field is initialized or not, I prefer to make them nullable instead of resorting to the isInitialized check.

## Installation

This instrumentation comes with the [android agent](../../android-agent) out of the box, so
if you depend on it, you don't need to do anything else to install this instrumentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the dependency coordinates, in case someone isn't using the agent. This is an example of how we've added it to other instrumentations.

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

Nice, thanks for following up. I think @LikeTheSalad has some good feedback as well, but I think we're close to a great start. I'd love to see the corresponding semantic conventions PR as well. Cheers!

Copy link
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! 🙏

@LikeTheSalad LikeTheSalad merged commit 45d5303 into open-telemetry:main Oct 31, 2025
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants