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

Added Exporter type to Zipkin exporter options #1504

Merged

Conversation

utpilla
Copy link
Contributor

@utpilla utpilla commented Nov 11, 2020

Changes

-Added ExporterType to ZipkinExporter options
-Added BatchExportProcessor ctor parameters as ZipkinExporter options

Addressing issue #1493

@utpilla utpilla requested a review from a team November 11, 2020 05:03
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
Copy link
Member

Choose a reason for hiding this comment

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

Seems most of the using statements are not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed this.

@codecov
Copy link

codecov bot commented Nov 11, 2020

Codecov Report

Merging #1504 (cb79084) into master (745fccf) will decrease coverage by 0.11%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1504      +/-   ##
==========================================
- Coverage   81.39%   81.27%   -0.12%     
==========================================
  Files         232      233       +1     
  Lines        6357     6370      +13     
==========================================
+ Hits         5174     5177       +3     
- Misses       1183     1193      +10     
Impacted Files Coverage Δ
....Exporter.Zipkin/ZipkinExporterHelperExtensions.cs 15.38% <0.00%> (-17.95%) ⬇️
src/OpenTelemetry/BatchExportProcessor.cs 93.05% <ø> (ø)
...Telemetry.Exporter.Zipkin/ZipkinExporterOptions.cs 100.00% <100.00%> (ø)
src/OpenTelemetry/BatchExportProcessorOptions.cs 100.00% <100.00%> (ø)
...lemetry/Internal/SelfDiagnosticsConfigRefresher.cs 18.07% <0.00%> (-3.62%) ⬇️
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 79.41% <0.00%> (-2.95%) ⬇️
...ZPages/Implementation/ZPagesExporterEventSource.cs 62.50% <0.00%> (+6.25%) ⬆️

@utpilla utpilla closed this Nov 11, 2020
@utpilla utpilla reopened this Nov 11, 2020
namespace OpenTelemetry
{

internal static class BatchExportProcessorDefaultOptions
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this class, or these consts can be part of the BatchExportProcessor? (e.g. BatchExportProcessor.DefaultMaxQueueSize)?

Copy link
Member

Choose a reason for hiding this comment

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

I would move them onto BatchExportProcessorOptions and add "Default" prefix. Primary benefit being discoverability, they will show up on intellisense when user interacts with options instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have moved them to BatchExportProcessor as these are the default values to be used for this for BatchExportProcessor ctor parameters. BatchExportProcessorOptions allows the users to change this value but it has the default values for each of the properties mentioned in the comment. This way it would show up on the property description on Intellisense.

{
public class BatchExportProcessorOptions
{
public int MaxQueueSize { get; set; } = BatchExportProcessorDefaultOptions.MaxQueueSize;
Copy link
Member

Choose a reason for hiding this comment

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

Do we need units on the two size props? Or maybe just some renaming like MaxQueueLength/MaxBatchCount?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll rename it to MaxQueueLength. For, MaxBatchSize vs MaxBatchCount, I feel "size" goes well with batch as opposed to "count". I have no strong preference though.

Copy link
Member

@alanwest alanwest Nov 13, 2020

Choose a reason for hiding this comment

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

@CodeBlanch @utpilla Just a question for my own edification... what has been our precedent for naming things same/similar to names suggested in the spec? Have we been somewhat flexible in this regard?

https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#batching-processor

I'm just curious, no reason to hold up this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have renamed the BatchExportProcessorOptions properties to match the SDK spec since the file is now moved to OpenTelemetry and is not under OpenTelemetry.Exporter.Zipkin.

Copy link
Member

Choose a reason for hiding this comment

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

My default choice is - pick what spec says, so it'll be consistent across all other implementations. If the spec name doesn't make sense, send a proposal to spec repo - its usually fast to get approvals if the proposed name is better at clarifying things.

@cijothomas cijothomas mentioned this pull request Nov 12, 2020
3 tasks
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.

5 participants