Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Log traceID and meta RenderStats #1972

Merged
merged 3 commits into from
Aug 12, 2021
Merged

Conversation

shanson7
Copy link
Collaborator

@shanson7 shanson7 commented Apr 1, 2021

Fixes #1973

api/graphite.go Outdated Show resolved Hide resolved
api/middleware/logger.go Outdated Show resolved Hide resolved
api/graphite.go Outdated Show resolved Hide resolved
@Dieterbe
Copy link
Contributor

curious if @joe-elliott has any suggestions here.
Joe, if we want to emit log messages and somehow correlate messages corresponding to the same request together, what would you recommend? I know in jaeger land, you'd attach the log messages to the trace (i believe they get sent in the span data) but that makes us depend on jaeger, which is a heavy/expensive dependency we rather not enforce.
Shall we just log the trace ID in the log message and write it out to a file/stdout? AFAIK loki doesn't have a way to join messages by traceID (but it does have a way to filter by trace ID, and we could join in a log analysis script). Does tempo try to solve this at all?

@joe-elliott
Copy link
Member

Tempo also stores and returns "logs" or "events" like Jaeger. So you can continue attaching your logs to the spans and they will be retrieved when you request the trace.

api/middleware/logger.go Outdated Show resolved Hide resolved
api/graphite.go Outdated Show resolved Hide resolved
api/graphite.go Outdated Show resolved Hide resolved
api/graphite.go Outdated Show resolved Hide resolved
@shanson7 shanson7 changed the title [WIP] - Log traceID and meta RenderStats Log traceID and meta RenderStats Jul 1, 2021
@Dieterbe
Copy link
Contributor

this LGTM. just one outstanding comment about potentially moving the log call into renderMetrics()

@shanson7 shanson7 marked this pull request as ready for review August 11, 2021 14:55
@Dieterbe Dieterbe merged commit 95029db into grafana:master Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more logging with traceID
3 participants