-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
POTEL 60 - Replace OTel ContextStorage
wrapper with ContextStorageProvider
#3938
Conversation
|
Performance metrics 🚀
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
public final class SentryContextStorageProvider implements ContextStorageProvider { | ||
@Override | ||
public ContextStorage get() { | ||
System.out.println("hello from SentryContextStorageProvider"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed
* should try to use OTels StorageProvider mechanism instead. | ||
*/ | ||
// ContextStorage.addWrapper((storage) -> new SentryContextStorage(storage)); | ||
ContextStorage.addWrapper( | ||
(storage) -> new SentryContextStorage(new SentryOtelThreadLocalStorage())); | ||
// ContextStorage.addWrapper( | ||
// (storage) -> new SentryContextStorage(new SentryOtelThreadLocalStorage())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the code in place just in case we need to restore. We can release this way for rc.1
and remove it before GA.
📜 Description
Replace OTel
ContextStorage
wrapper withContextStorageProvider
by using SPI.💡 Motivation and Context
Bumping OTel instrumentation to
2.10.0
causes issues with our "no agent" use case where a logging appender causes early access toContext
and thus prevents us from registering theContextStorage
wrapper (since we try it too late and storage has already been marked as initialized). This gets rid of the ordering requirement and removes this brittleness from the SDK. It also allows us to upgrade OTel.💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps