Skip to content

How to access in Plugin the Elastic Trace ID  #20

@iqmeta

Description

@iqmeta

Hi,
we use https://doc.traefik.io/traefik/observability/tracing/elastic
Is it possible to log within plugin getting the trace id from request?

So we see in ContainerLog / APM etc. whatever happened in the plugin,
during the whole call cascade.

Header/Config/EnvVar?

event better something like this:

logger.Log(logging.Entry{
  Payload: "Did this",
  HttpRequest: &logging.HttpRequest{Request: r},
  //Traceparent : req.Header.Get("Traceparent") // or elastic-apm-traceparent
})

Cheers, Otto

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions