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

[BUG] Stack traces are reported for ALL spans (< 5 ms) #1949

Closed
z1c0 opened this issue Dec 13, 2022 · 1 comment · Fixed by #2126
Closed

[BUG] Stack traces are reported for ALL spans (< 5 ms) #1949

z1c0 opened this issue Dec 13, 2022 · 1 comment · Fixed by #2126
Assignees
Labels
agent-dotnet bug Something isn't working
Milestone

Comments

@z1c0
Copy link
Contributor

z1c0 commented Dec 13, 2022

APM Agent version

1.19.0

Environment

https://release-oblt.kb.us-west2.gcp.elastic-cloud.com/app/home#/

Describe the bug

All dotnet spans in this environment have stack trace data.
There is no evidence of SpanStackTraceMinDuration being configured, so spans with a duration below 5ms should
not report a stack trace.

To Reproduce

Here is an example of such a span (look at the JSON tab).

image

So far, the behavior could not be reproduced in a local dev environment.

Note: All dotnet spans in the environment where the problem occurs are of span.type = db, span.subtype = sqlite. This could be a clue.

image

Also, see this Slack thread

@z1c0 z1c0 added bug Something isn't working agent-dotnet labels Dec 13, 2022
@z1c0 z1c0 self-assigned this Dec 13, 2022
@gregkalapos
Copy link
Contributor

There is an optional parameter to capture the stacktrace when the span is started (this is due to `async): https://github.com/elastic/apm-agent-dotnet/blob/main/src/Elastic.Apm/Model/Span.cs#LL68

We do that in EFCore instrumentation: https://github.com/elastic/apm-agent-dotnet/blob/main/src/Elastic.Apm.EntityFrameworkCore/EfCoreDiagnosticListener.cs#L41

But I wonder if we remove those if the span is less than the SpanStackTraceMinDuration 🤔 I don't think so... shouldn't it be here? https://github.com/elastic/apm-agent-dotnet/blob/main/src/Elastic.Apm/Model/Span.cs#L471

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-dotnet bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

4 participants