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

feat: allow functionally generated span names #19

Merged
merged 4 commits into from
May 16, 2023

Conversation

asger-noer
Copy link
Contributor

This pull request will allow users to functionally decide how to create span names.

Take this example. This is the way sqlc forces you to annotate all your queries. It would be very this if the package could use this annotation.

-- name: ListAuthors :many
SELECT * FROM authors;

Allowing users to write a function that extracts the span name from the query statement would enable the user to name the span ListAuthors :many as an example instead of, in this case, -- with the default implementation.

Copy link
Member

@obitech obitech left a comment

Choose a reason for hiding this comment

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

I really like this, thanks for the contribution! 🎉
Some more test cases and we're good to go.

tracer_test.go Outdated Show resolved Hide resolved
@obitech
Copy link
Member

obitech commented May 15, 2023

@asger-noer asger-noer requested a review from obitech May 15, 2023 14:40
tracer.go Outdated Show resolved Hide resolved
Copy link
Member

@obitech obitech left a comment

Choose a reason for hiding this comment

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

LGTM

@costela PTAL too

@costela costela merged commit 9200314 into exaring:main May 16, 2023
@costela
Copy link
Member

costela commented May 16, 2023

LGTM! Thanks for the work! 👍 🚀

@asger-noer asger-noer deleted the add-functional-span-naming branch June 5, 2024 22:32
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.

3 participants