Skip to content
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

Don't capture exception records on dependencies #2307

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

trask
Copy link
Member

@trask trask commented Jun 1, 2022

Application Insights "exceptions" are meant for top-level exceptions (exceptions on request telemetry or logged exceptions).

@trask trask force-pushed the dont-capture-exceptions-on-dependencies branch 2 times, most recently from 2dab327 to 100a510 Compare June 1, 2022 04:10
@@ -166,6 +167,7 @@ public void map(SpanData span, Consumer<TelemetryItem> consumer) {
consumer.accept(telemetryItem);
exportEvents(
span,
telemetryItem.getData().getBaseData() instanceof RequestData,
Copy link
Contributor

Choose a reason for hiding this comment

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

how about !(telemetryItem.getData().getBaseData() instanceof RemoteDependencyData)?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's the same, since we map spans to either requests or dependencies, I think I like instance of RequestData because this is how I am thinking about it after the discussion with Osvaldo:

Application Insights "exceptions" are meant for top-level exceptions (exceptions on request telemetry or logged exceptions)

Copy link
Contributor

Choose a reason for hiding this comment

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

does it imply that it can be MessageData too?

// (exceptions on request telemetry or logged exceptions)

Copy link
Member Author

Choose a reason for hiding this comment

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

that is in LogDataMapper:

String stack = log.getAttributes().get(SemanticAttributes.EXCEPTION_STACKTRACE);
if (stack == null) {
consumer.accept(createMessageTelemetryItem(log));
} else {
consumer.accept(createExceptionTelemetryItem(log, stack));
}

Copy link
Member Author

Choose a reason for hiding this comment

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

(where we create either message or exception record, but not both)

@trask trask marked this pull request as ready for review June 1, 2022 15:49
@trask trask force-pushed the dont-capture-exceptions-on-dependencies branch from 100a510 to 7d68689 Compare June 1, 2022 15:50
@trask trask merged commit 993f6f5 into main Jun 1, 2022
@trask trask deleted the dont-capture-exceptions-on-dependencies branch June 1, 2022 20:28
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.

2 participants