Skip to content

Fix edge case where InstrumentionOptions could not be a shared instance - #7914

Merged
ramonsmits merged 1 commit into
otelfrom
fix-otel-hostingcomponents-settings-instrumentationoptions
Aug 26, 2026
Merged

Fix edge case where InstrumentionOptions could not be a shared instance#7914
ramonsmits merged 1 commit into
otelfrom
fix-otel-hostingcomponents-settings-instrumentationoptions

Conversation

@ramonsmits

@ramonsmits ramonsmits commented Aug 20, 2026

Copy link
Copy Markdown
Member

Previously the InstrumentationOptions during initializaion COULD result in not having a singleton/shared instance. The edge case was when initialized based on ennvvars. This was applied on the resolved non shared instance.

@irinascurtu
irinascurtu marked this pull request as ready for review August 25, 2026 12:13
@ramonsmits
ramonsmits force-pushed the fix-otel-hostingcomponents-settings-instrumentationoptions branch from 61da0f0 to 2f42034 Compare August 26, 2026 12:37
@ramonsmits
ramonsmits requested a review from tmasternak August 26, 2026 12:38
@ramonsmits
ramonsmits force-pushed the fix-otel-hostingcomponents-settings-instrumentationoptions branch from 2f42034 to bf13d51 Compare August 26, 2026 12:41
using (Assert.EnterMultipleScope())
{
Assert.That(handlerActivity.Events, Is.Empty, "the exception should not be recorded as a span event when the endpoint opted in to exceptions as logs");
Assert.That(receiveActivity.Events, Is.Empty, "the exception should not be recorded as a span event when the endpoint opted in to exceptions as logs");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we don't need to assert on the receive activity only the handler one

@ramonsmits
ramonsmits force-pushed the fix-otel-hostingcomponents-settings-instrumentationoptions branch from bf13d51 to 540e351 Compare August 26, 2026 12:46
@ramonsmits
ramonsmits merged commit 96f8a16 into otel Aug 26, 2026
4 checks passed
@ramonsmits
ramonsmits deleted the fix-otel-hostingcomponents-settings-instrumentationoptions branch August 26, 2026 12:48
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