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

Log span name when include_all_attributes is on #1790

Merged
merged 2 commits into from Oct 11, 2022

Conversation

suraciii
Copy link
Contributor

@suraciii suraciii commented Oct 11, 2022

What this PR does:

Add a span_name field into span logs of distributors, span.Name will only be logged if include_all_attributes is set to true.

Which issue(s) this PR fixes:
Fixes #1788

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@suraciii
Copy link
Contributor Author

There might be a flaky test at modules/generator/storage/instance_test.go:71, it failed once and after re-run it passed.

level=info tenant=test-tenant msg="closing WAL" dir=/tmp/TestInstance2651762728/001/test-tenant
tenant=test-tenant component=remote level=info remote_name=c83879 url=http://127.0.0.1:41199/receive msg="Stopping remote storage..."
tenant=test-tenant component=remote level=warn remote_name=c83879 url=http://127.0.0.1:41199/receive msg="Failed to send batch, retrying" err="server returned HTTP status 503 Service Unavailable: request refused"
component=mockserver msg="received request" tenant=test-tenant
tenant=test-tenant component=remote level=info remote_name=c83879 url=http://127.0.0.1:41199/receive msg="WAL watcher stopped" queue=c83879
tenant=test-tenant component=remote level=info remote_name=c83879 url=http://127.0.0.1:41199/receive msg="Stopping metadata watcher..."
tenant=test-tenant component=remote level=info remote_name=c83879 url=http://127.0.0.1:41199/receive msg="Scraped metadata watcher stopped"
tenant=test-tenant component=remote level=info remote_name=c83879 url=http://127.0.0.1:41199/receive msg="Remote storage stopped."
--- FAIL: TestInstance (5.05s)
instance_test.go:71:
Error Trace: /home/runner/work/tempo/tempo/modules/generator/storage/instance_test.go:71
/home/runner/work/tempo/tempo/modules/generator/storage/instance_test.go:268
/home/runner/work/tempo/tempo/modules/generator/storage/asm_amd64.s:1594
Error: Received unexpected error:
write /tmp/TestInstance2651762728/001/test-tenant/wal/00000000: file already closed
Test: TestInstance

Seems it's because a commit action ran after the storage instance closed.
Does this random failure happen before?

Copy link
Member

@mapno mapno left a comment

Choose a reason for hiding this comment

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

Could you add a CHANGELOG entry? Thanks for the contribution!

@suraciii
Copy link
Contributor Author

@mapno My pleasure, CHANGELOG updated

@joe-elliott joe-elliott merged commit 2ea4dd8 into grafana:main Oct 11, 2022
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.

Log span name when logging received spans in distributors
3 participants