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

More flexibility when extracting span attributes from input/output with tapir endpoints #90

Open
Tracked by #662
fiadliel opened this issue Nov 17, 2021 · 1 comment
Assignees

Comments

@fiadliel
Copy link
Contributor

As I understand it, the current tracing integration allows one to provide a function to get header data from input/output types, and these are added as attributes, following req.header.{Header-Name} or resp.header.{Header-Name}.

I'm not sure of the right way to do this, but it would be nice for it to be possible to attribute arbitrary information from input and output parameters.

The simplest thing that could possibly work might be two new parameters:

  • I => Seq[(String, AttributeValue)]
  • O => Seq[(String, AttributeValue)]

Does this then reduce the need for the header extractors? It is nice that they provide a standard format for header naming, but they duplicate this ability to some extent.

@fiadliel fiadliel changed the title More flexibility when extracting span attributes from input/output More flexibility when extracting span attributes from input/output with tapir endpoints Nov 17, 2021
@catostrophe
Copy link
Member

I agree that the current requirement for a Headers extractor doesn't seem to be the best option. I will try to rework it along with the support for secured endpoints.

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

No branches or pull requests

2 participants