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

Make OtlpExporter class internal #1528

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporter
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ChannelOptions.get -> System.Collections.Generic.IEnumerable<Grpc.Core.ChannelOption>
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ChannelOptions.set -> void
Expand All @@ -12,5 +11,4 @@ OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.OtlpExporterOpt
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ServiceName.get -> string
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ServiceName.set -> void
OpenTelemetry.Trace.OtlpExporterHelperExtensions
override OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporter.Export(in OpenTelemetry.Batch<System.Diagnostics.Activity> activityBatch) -> OpenTelemetry.ExportResult
static OpenTelemetry.Trace.OtlpExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions> configure = null) -> OpenTelemetry.Trace.TracerProviderBuilder
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporter
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ChannelOptions.get -> System.Collections.Generic.IEnumerable<Grpc.Core.ChannelOption>
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ChannelOptions.set -> void
Expand All @@ -12,5 +11,4 @@ OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.OtlpExporterOpt
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ServiceName.get -> string
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ServiceName.set -> void
OpenTelemetry.Trace.OtlpExporterHelperExtensions
override OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporter.Export(in OpenTelemetry.Batch<System.Diagnostics.Activity> activityBatch) -> OpenTelemetry.ExportResult
static OpenTelemetry.Trace.OtlpExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions> configure = null) -> OpenTelemetry.Trace.TracerProviderBuilder
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporter
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ChannelOptions.get -> System.Collections.Generic.IEnumerable<Grpc.Core.ChannelOption>
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ChannelOptions.set -> void
Expand All @@ -12,5 +11,4 @@ OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.OtlpExporterOpt
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ServiceName.get -> string
OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions.ServiceName.set -> void
OpenTelemetry.Trace.OtlpExporterHelperExtensions
override OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporter.Export(in OpenTelemetry.Batch<System.Diagnostics.Activity> activityBatch) -> OpenTelemetry.ExportResult
static OpenTelemetry.Trace.OtlpExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.OpenTelemetryProtocol.OtlpExporterOptions> configure = null) -> OpenTelemetry.Trace.TracerProviderBuilder
2 changes: 2 additions & 0 deletions src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Code generated from proto files has been marked internal. This includes
everything under the `OpenTelemetry.Proto` namespace.
([#1524](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1524))
* The `OtlpExporter` class has been made internal.
([#1528](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1528))

## 0.8.0-beta.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace OpenTelemetry.Exporter.OpenTelemetryProtocol
/// Exporter consuming <see cref="Activity"/> and exporting the data using
/// the OpenTelemetry protocol (OTLP).
/// </summary>
public class OtlpExporter : BaseExporter<Activity>
internal class OtlpExporter : BaseExporter<Activity>
Copy link
Member

Choose a reason for hiding this comment

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

the ctor() was already internal, so we wont break anyone right?

Copy link
Member Author

@alanwest alanwest Nov 12, 2020

Choose a reason for hiding this comment

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

By the class being public, the type is visible, so a user can type var exporter = new OtlpExporter() ... but with no way to construct it, is there any value in exposing it?

Ah, sorry, I misread your question... it does not appear to break anything.

Copy link
Member

Choose a reason for hiding this comment

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

Agree.
I was thinking -- if a user want to write own Batching/SimpleExportprocessor, then they wont be able to do that, as they cannot construct the exporter. But its okay, as spec talks about only 2 ExportingProcessors. and #1504 will solve customization issues as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, if #1504 is the pattern we want going forward, then I don't think we need to expose the classes. We could always re-expose the classes with a public constructor if we saw some need for that in the future.

{
private readonly OtlpExporterOptions options;
private readonly Channel channel;
Expand Down