Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing: add http.request.header.referer #1336

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

tomasz-sodzawiczny
Copy link
Contributor

towards NSL-4308

return otelhttp.NewHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// add referer
span := t.SpanFromContext(r.Context())
if span.IsRecording() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: span.IsRecording() should not be needed. Because if span is not present, then SetAttributes is a safe no-op.

Copy link
Contributor

@gmichelo gmichelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tomasz-sodzawiczny tomasz-sodzawiczny added this pull request to the merge queue Oct 7, 2024
Merged via the queue into main with commit f82e1bc Oct 7, 2024
21 checks passed
@tomasz-sodzawiczny tomasz-sodzawiczny deleted the tomasz/add-referer branch October 7, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants