-
Notifications
You must be signed in to change notification settings - Fork 773
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
Update OTEL_EXPORTER_JAEGER_PROTOCOL parsing #2914
Update OTEL_EXPORTER_JAEGER_PROTOCOL parsing #2914
Conversation
b2fe406
to
01b7bef
Compare
01b7bef
to
b5ff50e
Compare
|`udp/thrift.compact`| Apache Thrift compact over UDP to a Jaeger Agent. | | ||
|`http/thrift.binary`| Apache Thrift binary over HTTP to a Jaeger Collector. | |
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.
I think this table is more about .NET API.
I would consider adding a footnote to the OTEL_EXPORTER_JAEGER_PROTOCOL
or find another way to describe it in Environment Variables
section. As for me it can be done like in https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol#environment-variables to remain consistent.
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.
fixed c1b1401
Codecov Report
@@ Coverage Diff @@
## main #2914 +/- ##
==========================================
+ Coverage 83.88% 84.43% +0.55%
==========================================
Files 253 253
Lines 8910 8901 -9
==========================================
+ Hits 7474 7516 +42
+ Misses 1436 1385 -51
|
|
||
internal static class JaegerExporterOptionsExtensions | ||
{ | ||
public static JaegerExportProtocol? ToJaegerExportProtocol(this string protocol) => |
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.
subjective opinion (no need to be addressed)
As rule of thumb, I avoid adding extension methods for BCL classes unless these are very generic. This method is only used in JaegerExporterOptions
and tests so I would rather not add is as an extension method to string
. Personally, I would move it to JaegerExporterOptions
class with following signature:
internal static JaegerExportProtocol? ParseProtocol(string value)
or
internal static bool ParseProtocol(string value, out JaegerExportProtocol result)
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.
In general, I agree, but the same convention is for parsing OTLP parsing value. I would keep it as it is.
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.
+1, echo from #2875 (comment)
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.
#2919 created
test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterOptionsTests.cs
Outdated
Show resolved
Hide resolved
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.
I left a few comments, but none of them is a blocker for me
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.
LGTM.
src/OpenTelemetry.Exporter.Jaeger/JaegerExporterOptionsExtensions.cs
Outdated
Show resolved
Hide resolved
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.
LGTM
Fixes #2910.
Changes
Align the
OTEL_EXPORTER_JAEGER_PROTOCOL
parsing with the specFor significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes