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

Autoinstrument Java lambda RequestStreamHandler, not just RequestHandler #10639

Open
hertzsprung opened this issue Feb 22, 2024 · 3 comments
Open
Labels
enhancement New feature or request needs triage New issue that requires triage

Comments

@hertzsprung
Copy link

Is your feature request related to a problem? Please describe.

Yes. Using the Java agent lambda layer, metrics and traces from a RequestStreamHandler are not flushed promptly when the lambda function completes. This only affects RequestStreamHandlers; RequestHandlers behave correctly.

Describe the solution you'd like

Autoinstrument both types of request handler

Describe alternatives you've considered

A separate wrapper is available to support RequestStreamHandlers, but this isn't available from any publicly published lambda layer, as far as I can tell.

Additional context

No response

@hertzsprung hertzsprung added enhancement New feature or request needs triage New issue that requires triage labels Feb 22, 2024
@trask
Copy link
Member

trask commented Feb 27, 2024

cc @tylerbenson @rapphil

@tylerbenson
Copy link
Member

tylerbenson commented Feb 28, 2024

On the lambda sig side, I'd be open to publishing a layer with the wrappers (and a collector) separate from the javaagent layer. I didn't put time into it initially because I didn't know how widely used the wrappers were. Would that solve your problem?

@hertzsprung If you want to attempt submitting your own PR for adding auto instrumentation for RequestStreamHandler, that sounds like a potential good first contribution as you can lean heavily on the other instrumentation for inspiration.

@hertzsprung
Copy link
Author

I've only read the wrapper docs and not tried it but I could look at using the wrapper layer instead of the agent layer.

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

No branches or pull requests

3 participants