Skip to content

Question: why we use spanId and rootSpanId to correlate profiles with traces #8159

Open
@steverao

Description

@steverao

Hi everyone!

I have a question about the profile module in the codebase. Specifically, I would like to understand why we use spanId and rootSpanId to correlate profiles with traces in Datadog's dd-trace-java repository.

In my opinion, there are several approaches to correlating profiles with traces:

  1. Use traceId and spanId to correlate each span with the related profile data.
  2. Use traceId to correlate the entire trace with the related profile data.

However, I noticed that we use spanId and rootSpanId in the dd-trace-java project. Is there any deeper consideration behind this choice?

I hope to receive your response. Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions