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

Configurable custom additional span attributes for the sql clients #2765

Closed
vecerek opened this issue May 16, 2024 · 0 comments · Fixed by #2838
Closed

Configurable custom additional span attributes for the sql clients #2765

vecerek opened this issue May 16, 2024 · 0 comments · Fixed by #2838
Labels
enhancement New feature or request

Comments

@vecerek
Copy link
Contributor

vecerek commented May 16, 2024

What is the problem this feature would solve?

As far as I'm aware, it is not possible to configure a SQL client with default custom span attributes that would be added every time a sql query is executed. This is only possible for the generic @effect/sql client but not the specific implementations like @effect/sql-mysql2.

Making this possible would allow the user to adapt the span to achieve an "ideal" visualization in their observability vendor's systems. For example, there are a few extra attributes I would need to globally set for the sql client for the spans to show up as I'd like.

Screenshot 2024-05-17 at 01 42 45 Screenshot 2024-05-17 at 01 43 01

What is the feature you are proposing to solve the problem?

I would either like the sql client "implementation" take an optional configuration field called additionalSpanAttributes in its constructor, or add a mechanism similar to the statement transformer that would take the additional span attributes from the fiberRef and apply them to the span here.

What alternatives have you considered?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant