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

Update OtlpExporter options #1781

Merged

Conversation

utpilla
Copy link
Contributor

@utpilla utpilla commented Feb 3, 2021

Related to #1778

Changes

  • Updated the datatype of the Headers option to string; Added a private method in OtlpExporterClass to create a Metadata object form the Headers
  • Added TimeOut option which is used to compute deadline for Export using gRPC client
  • CHANGELOG.md updated for non-trivial changes

@utpilla utpilla requested a review from a team as a code owner February 3, 2021 08:06
@codecov
Copy link

codecov bot commented Feb 3, 2021

Codecov Report

Merging #1781 (2b6bbb0) into main (fbfdb70) will decrease coverage by 0.19%.
The diff coverage is 29.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1781      +/-   ##
==========================================
- Coverage   84.09%   83.89%   -0.20%     
==========================================
  Files         187      187              
  Lines        5935     5956      +21     
==========================================
+ Hits         4991     4997       +6     
- Misses        944      959      +15     
Impacted Files Coverage Δ
...xporter.OpenTelemetryProtocol/OtlpTraceExporter.cs 47.82% <22.72%> (-11.36%) ⬇️
...orter.OpenTelemetryProtocol/OtlpExporterOptions.cs 100.00% <100.00%> (ø)
...ZPages/Implementation/ZPagesExporterEventSource.cs 62.50% <0.00%> (+6.25%) ⬆️

@@ -159,5 +166,29 @@ protected override bool OnShutdown(int timeoutMilliseconds)

return Task.WaitAny(new Task[] { this.channel.ShutdownAsync(), Task.Delay(timeoutMilliseconds) }) == 0;
}

private static Metadata GetMetadataFromHeaders(string headers)
Copy link
Member

Choose a reason for hiding this comment

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

we'll need unit test for this. (okay to add in separate PR)

Copy link
Member

@CodeBlanch CodeBlanch left a comment

Choose a reason for hiding this comment

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

LGTM

@cijothomas cijothomas merged commit e0bcc80 into open-telemetry:main Feb 3, 2021
@utpilla utpilla deleted the utpilla/Fix-OtlpExporterOptions branch February 10, 2021 00:36
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.

None yet

5 participants