Skip to content

Conversation

@adinauer
Copy link
Member

📜 Description

Implement a hook for OpenFeature that tracks feature flag evaluations.

💡 Motivation and Context

Closes #4905

💚 How did you test it?

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against e260f55

private final IScopes scopes;

public SentryOpenFeatureHook() {
this(ScopesAdapter.getInstance());
Copy link
Member Author

Choose a reason for hiding this comment

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

SentryIntegrationPackageStorage calls are missing

implementation(projects.sentryGraphql22)
implementation(projects.sentryQuartz)
implementation(projects.sentryAsyncProfiler)
implementation(projects.sentryOpenfeature)
Copy link
Member Author

Choose a reason for hiding this comment

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

More samples + e2e tests

"sentry-opentelemetry:sentry-opentelemetry-agentless-spring",
"sentry-quartz",
"sentry-okhttp",
"sentry-openfeature",
Copy link
Member Author

@adinauer adinauer Nov 17, 2025

Choose a reason for hiding this comment

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

+ Readme and bug report template

@adinauer
Copy link
Member Author

Also tested LaunchDarkly via OpenFeature locally - it works!
Didn't push the required changes since it requires an account on their side and using the in-memory provider of this PR seems like a more accessible way for customers to play with the sample.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 353.18 ms 443.41 ms 90.23 ms
Size 1.58 MiB 2.13 MiB 556.44 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ee747ae 357.79 ms 421.84 ms 64.05 ms
ae7fed0 293.84 ms 380.22 ms 86.38 ms
9fbb112 404.51 ms 475.65 ms 71.14 ms
27d7cf8 397.90 ms 498.65 ms 100.75 ms
a416a65 333.78 ms 410.37 ms 76.59 ms
d217708 411.22 ms 430.86 ms 19.63 ms
539ca63 313.51 ms 355.43 ms 41.92 ms
23d6b12 354.10 ms 408.38 ms 54.28 ms
14ff5ee 419.75 ms 495.73 ms 75.98 ms
ce0a49e 532.00 ms 609.96 ms 77.96 ms

App size

Revision Plain With Sentry Diff
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
ae7fed0 1.58 MiB 2.12 MiB 551.77 KiB
9fbb112 1.58 MiB 2.11 MiB 539.18 KiB
27d7cf8 1.58 MiB 2.12 MiB 549.42 KiB
a416a65 1.58 MiB 2.12 MiB 555.26 KiB
d217708 1.58 MiB 2.10 MiB 532.97 KiB
539ca63 1.58 MiB 2.12 MiB 551.41 KiB
23d6b12 1.58 MiB 2.10 MiB 532.31 KiB
14ff5ee 1.58 MiB 2.10 MiB 535.08 KiB
ce0a49e 1.58 MiB 2.10 MiB 532.94 KiB

Previous results on branch: feat/openfeature-integration

Startup times

Revision Plain With Sentry Diff
4b5640b 312.42 ms 363.19 ms 50.77 ms
0a4d1a9 314.85 ms 374.60 ms 59.74 ms

App size

Revision Plain With Sentry Diff
4b5640b 1.58 MiB 2.12 MiB 555.28 KiB
0a4d1a9 1.58 MiB 2.12 MiB 555.26 KiB

@adinauer adinauer marked this pull request as ready for review November 17, 2025 14:27
Copy link
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

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

Nice, LGTM

@adinauer adinauer changed the title Implement OpenFeature Integration feat(flags): Implement OpenFeature Integration Nov 19, 2025
maven:io.sentry:sentry-android-fragment:
maven:io.sentry:sentry-bom:
maven:io.sentry:sentry-openfeign:
#maven:io.sentry:sentry-openfeature:
Copy link

Choose a reason for hiding this comment

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

Bug: OpenFeature module commented out in release registry

The sentry-openfeature entry is commented out in the craft registry configuration while the module is fully implemented and integrated. This will prevent the artifact from being published to Maven Central during releases, making it unavailable to users despite being documented and built.

Fix in Cursor Fix in Web

maven:io.sentry:sentry-android-fragment:
maven:io.sentry:sentry-bom:
maven:io.sentry:sentry-openfeign:
#maven:io.sentry:sentry-openfeature:
Copy link

Choose a reason for hiding this comment

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

Bug: OpenFeature module commented out in release registry

The sentry-openfeature entry is commented out in the craft registry while the module is fully implemented and integrated. This will prevent the artifact from being published to Maven Central during releases, making it unavailable to users despite being documented and built.

Fix in Cursor Fix in Web

@adinauer adinauer merged commit 23b6ef9 into main Nov 19, 2025
61 of 63 checks passed
@adinauer adinauer deleted the feat/openfeature-integration branch November 19, 2025 13:23
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.

Report OpenFeature feature flag evaluations

4 participants