Skip to content

Log "parentId" received as HTTP header in MDC #4551

Open
@fer1979

Description

@fer1979

Hi, I am trying to look for a solution to log using MDC, the "parentId" received as an HTTP header(as a W3C header or B3 header) in a microservice using Spring WebFlux application.

Currently the logs using MDC are logging the traceId and spanId but not the "parentId". I have been reading documentation of OpenTelemetry and it seems that currently the parentId is stored in the Span created in OpenTelemetry but the api does not expose the parentId. So it seems that I have to put manually in some way this property in the MDC but I dont know how do it and besides I am using Spring WebFlux that uses Context from Reactor so I will have to do it in a reactive way.

OpenTelemetry does store the traceId and spanId received as http headers in the MDC context in a reactive way so I have to do the same for the parentId. Is there some guide, example or documentacion to achieve this?.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec:logsRelated to the specification/logs directorytriage:deciding:needs-infoNot enough information. Left open to provide the author with time to add more details

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions