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

http server and client builder for netty #12083

Merged
merged 14 commits into from
Sep 24, 2024

Conversation

zeitlinger
Copy link
Member

No description provided.

@zeitlinger zeitlinger self-assigned this Aug 22, 2024
@zeitlinger zeitlinger requested a review from a team August 22, 2024 12:34
@zeitlinger zeitlinger mentioned this pull request Aug 22, 2024
@zeitlinger zeitlinger changed the title http server builder for netty http server and client builder for netty Aug 22, 2024
@zeitlinger
Copy link
Member Author

@trask @laurit can you take a look?

public String getInstrumentationName() {
return instrumentationName;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

to me this method and getOpenTelemetry feel out of place in this class.

Copy link
Member Author

Choose a reason for hiding this comment

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

added a instrumenterBuilder method instead and only exposed propagators of OpenTelemetry

@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Aug 27, 2024
@zeitlinger
Copy link
Member Author

@laurit please check again

Comment on lines +22 to +23
// this logic is only used in agent
builder.setEmitExperimentalHttpServerEvents(true);
Copy link
Member

Choose a reason for hiding this comment

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

is there reason not to expose this to library instrumentation?

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +226 to +224
public <BUILDERREQUEST, BUILDERRESPONSE>
InstrumenterBuilder<BUILDERREQUEST, BUILDERRESPONSE> instrumenterBuilder(
SpanNameExtractor<? super BUILDERREQUEST> spanNameExtractor) {
return Instrumenter.builder(openTelemetry, instrumentationName, spanNameExtractor);
Copy link
Member

Choose a reason for hiding this comment

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

this method is confusing, I finally understood it, but wonder if there's anything we can do to make it clearer

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe toInstrumenterBuilder?

Comment on lines +199 to +197
if (headerGetter != null) {
return builder.buildServerInstrumenter(headerGetter);
}
return builder.buildInstrumenter(SpanKindExtractor.alwaysServer());
Copy link
Member

Choose a reason for hiding this comment

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

are there any server instrumentations that don't provide a headerGetter?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, they all do

Copy link
Member Author

Choose a reason for hiding this comment

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

made it part of the ctor

Copy link
Member Author

Choose a reason for hiding this comment

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

just found that ktor doesn't have the header getter - but this is an upcoming pr

@zeitlinger
Copy link
Member Author

@trask please check again

@zeitlinger zeitlinger force-pushed the http-server-builder-netty branch from fdcbbea to eb0cc91 Compare September 2, 2024 16:28
@zeitlinger
Copy link
Member Author

@laurit please check again

@laurit laurit merged commit e397159 into open-telemetry:main Sep 24, 2024
56 checks passed
@zeitlinger zeitlinger deleted the http-server-builder-netty branch September 26, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test native This label can be applied to PRs to trigger them to run native tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants