grafana / grafana/pyroscope-dotnet
Trace to Profile in aspnetcore nested Activities
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 38
- Forks
- 14
- Avg merge
- 20h 15m
- Merged PRs (30d)
- 10
Description
The PyroscopeSpanProcessor works like a charm with aspnetcore, I see the pyroscope.profile.id in the root span and the linked profile includes the cpu/mem intensive call stack
[HttpGet]
public async Task<string> Get()
{
... cpu/mem intensive work ...
}
But it does not work when manually defining child Activities. With the following example I see the pyroscope.profile.id in the root span but the linked profile does not include the cpu/mem intensive call stack and there is no pyroscope.profile.id on the MyCustomActivity child span.
[HttpGet]
public async Task<string> Get()
{
using (var activity = ActivitySource.StartActivity("MyCustomActivity", ActivityKind.Internal, default(ActivityContext)))
{
... cpu/mem intensive work ...
}
}
Environment
.Net 8
opentelemetry.instrumentation.aspnetcore 1.8.1
pyroscope-dotnet v0.2.0-opentelemetry
pyroscope.0.8.14-glibc-x86_64
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Pyroscope/Pyroscope.OpenTelemetry/PyroscopeSpanProcessor.cs at the linked location and reproduce the .NET 8 example with a manually created nested Activity. Compare the root and MyCustomActivity spans and the linked profile. Done means the child span receives pyroscope.profile.id and its CPU/memory-intensive call stack appears in the linked profile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100