Skip to content

The trace_id between requests is getting mixed up #3061

@ionling

Description

@ionling

What happened:

The trace_id between requests is getting mixed up.

What you expected to happen:

The trace_id between requests is independent.

How to reproduce it (as minimally and precisely as possible):

Use a log.Filter as the global logger
and enable both tracing.Server() and logging.Server() middlewares.

Anything else we need to know?:

this is cauased by log.WithContext().

f.ctx = ctx

Environment:

  • Kratos version (use kratos -v): v2.6.3
  • Go version (use go version): 1.20

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions