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

Add HTTP server tests for non standard methods #9446

Merged
merged 5 commits into from
Sep 15, 2023

Conversation

mateuszrzeszutek
Copy link
Member

Resolves #8951

@mateuszrzeszutek mateuszrzeszutek requested a review from a team September 12, 2023 11:52
* Returns a new {@link HttpServerRouteBuilder} that can be used to configure the {@link
* HttpServerRoute}.
*/
public static <REQUEST> HttpServerRouteBuilder<REQUEST> builder(
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to add a builder for the HttpServerRoute as well, because it updates the span name.

I'm starting to think that this may be kind of cumbersome for the users, if you want to use custom knownMethods you have to set it in 3 different builders. What if we had some Http(Server|Client)Semconv class that has just one builder, and provides facrory methods for all the instrumenter parts? Just an idea for future PRs.

Copy link
Member

Choose a reason for hiding this comment

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

it does seem really easy to miss that you need to set knownMethod in all 3 of those places...

@trask trask merged commit 3136916 into open-telemetry:main Sep 15, 2023
45 checks passed
samwright added a commit to annotell/opentelemetry-java-instrumentation that referenced this pull request Sep 22, 2023
@mateuszrzeszutek mateuszrzeszutek deleted the http-server-non-standard branch October 5, 2023 18:56
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.

Add common http client/server tests which exercise a non-standard http.request.method value
3 participants