-
Notifications
You must be signed in to change notification settings - Fork 872
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
http server and client builder for netty #12083
Conversation
public String getInstrumentationName() { | ||
return instrumentationName; | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
...try/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java
Outdated
Show resolved
Hide resolved
...y/instrumentation/netty/v4/common/internal/client/NettyClientInstrumenterBuilderFactory.java
Outdated
Show resolved
Hide resolved
...y/src/main/java/io/opentelemetry/instrumentation/netty/v4_1/NettyServerTelemetryBuilder.java
Outdated
Show resolved
Hide resolved
@laurit please check again |
// this logic is only used in agent | ||
builder.setEmitExperimentalHttpServerEvents(true); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for javaagent, there is no dedicated property
...ain/java/io/opentelemetry/javaagent/bootstrap/internal/JavaagentHttpServerInstrumenters.java
Outdated
Show resolved
Hide resolved
public <BUILDERREQUEST, BUILDERRESPONSE> | ||
InstrumenterBuilder<BUILDERREQUEST, BUILDERRESPONSE> instrumenterBuilder( | ||
SpanNameExtractor<? super BUILDERREQUEST> spanNameExtractor) { | ||
return Instrumenter.builder(openTelemetry, instrumentationName, spanNameExtractor); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe toInstrumenterBuilder
?
if (headerGetter != null) { | ||
return builder.buildServerInstrumenter(headerGetter); | ||
} | ||
return builder.buildInstrumenter(SpanKindExtractor.alwaysServer()); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, they all do
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
@trask please check again |
...try/instrumentation/api/incubator/builder/internal/DefaultHttpClientInstrumenterBuilder.java
Outdated
Show resolved
Hide resolved
...try/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java
Outdated
Show resolved
Hide resolved
…tors of `OpenTelemetry`
fdcbbea
to
eb0cc91
Compare
@laurit please check again |
No description provided.