-
Notifications
You must be signed in to change notification settings - Fork 780
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
Otlp http exporter: allow endpoint override #2492
Otlp http exporter: allow endpoint override #2492
Conversation
… metrics and adjusted them according to spec. when reading it from environment variables + allow Endpoint override
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.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 see some build errors but apart from it looks OK.
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 some nits on the docs. I guess there will be a separate work to add "support" for the per-signal env vars?
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
- improved descriptions and README for new added properties Co-authored-by: Joao Grassi <joao@joaograssi.com>
…ctor instead of property
...etry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/OtlpHttpTraceExportClient.cs
Outdated
Show resolved
Hide resolved
@rypdal I have a few questions regarding spec compliance here . The spec mentions two scenarios for constructing URLs:
It looks like currently we are not reading from
When someone sets the |
…uri in export client + fixed unit test
Codecov Report
@@ Coverage Diff @@
## main #2492 +/- ##
==========================================
- Coverage 79.90% 79.86% -0.05%
==========================================
Files 251 251
Lines 8939 8948 +9
==========================================
+ Hits 7143 7146 +3
- Misses 1796 1802 +6
|
- got rid of traces and metrics endpoints in exporter options as it should be considered along with per-signal env. vars. and out of scope of this issue - traces and metrics relative paths append logic is located in corresponding AddOtlpExporter methods where call scope is known
@utpilla , please, see my answers/last changes below:
|
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptionsExtensions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptionsExtensions.cs
Outdated
Show resolved
Hide resolved
I see a lot changes and I have no time to review it today. Sorry :(
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptionsExtensions.cs
Outdated
Show resolved
Hide resolved
… variable naming and improved comments
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OtlpExporterOptionsExtensionsTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OtlpExporterOptionsExtensionsTests.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, thanks @rypdal!
@cijothomas , @pellared , @alanwest , @utpilla , @joaopgrassi. @mic-max , @reyang thank you all for the review and discussions. |
Fixes #.
Changes
Implemented the following behaviour:
default path is only appended when the Options.Endpoint property wasn't set by the user, the protocol is HttpProtobuf and the OTEL_EXPORTER_OTLP_ENDPOINT environment variable is present. If the user provides a custom value for Options.Endpoint that value is taken as is.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes