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

[metrics branch] Add configuration of persistent storage to OTLP Exporter #4121

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3a15b77
Add options for persistent storage to OTLP Exporter
mic-max Jan 31, 2023
eb70d89
Add publicApi
mic-max Jan 31, 2023
93701d4
Merge branch 'main-metrics' into otld-persist-failed-exports
mic-max Jan 31, 2023
e0b3013
Update OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj
mic-max Jan 31, 2023
9a0124b
Merge branch 'otld-persist-failed-exports' of https://github.com/mic-…
mic-max Jan 31, 2023
2593a5c
Switch to service DI
mic-max Jan 31, 2023
b5e870a
remove no longer needed public api additions
mic-max Jan 31, 2023
63d0f47
Merge branch 'main-metrics' into otld-persist-failed-exports
mic-max Jan 31, 2023
5253e11
move to trace exporter
mic-max Feb 2, 2023
86acbb2
Update TestOtlpExporter.cs
mic-max Feb 4, 2023
a8aacfa
otlp grpc trace export client has access to persistentblobprovider now
mic-max Feb 4, 2023
5012cd6
Update OtlpGrpcTraceExportClient.cs
mic-max Feb 4, 2023
141bc86
null check
mic-max Feb 4, 2023
ceed9cc
test
mic-max Feb 9, 2023
dd099ce
add serviceprovider
mic-max Feb 9, 2023
7701bd6
cleanup
mic-max Feb 9, 2023
3e95109
Update TestOtlpExporter.cs
mic-max Feb 9, 2023
fbc63e1
Update OtlpTraceExporterHelperExtensions.cs
mic-max Feb 9, 2023
4d0afe1
Merge branch 'main-metrics' into otld-persist-failed-exports
mic-max Feb 9, 2023
557f2a7
move persistentstorage factory call 1 function deeper
mic-max Feb 9, 2023
54ff784
Merge branch 'otld-persist-failed-exports' of https://github.com/mic-…
mic-max Feb 9, 2023
72a55fa
move to new package
mic-max Feb 13, 2023
6a098a7
Update OtlpGrpcTraceExportClient.cs
mic-max Feb 13, 2023
6b6621a
api
mic-max Feb 14, 2023
be2b95f
undo changes to otlptraceexporterhelperextensions
mic-max Feb 14, 2023
3eb6da3
Update Examples.Console.csproj
mic-max Feb 14, 2023
075cae0
Update OtlpExporterOptionsExtensions.cs
mic-max Feb 14, 2023
0973444
delete api line
mic-max Feb 14, 2023
0c699e2
Merge branch 'main-metrics' into otld-persist-failed-exports
mic-max Feb 15, 2023
a0b41f7
reanme
mic-max Feb 15, 2023
d5ca3ad
Merge branch 'otld-persist-failed-exports' of https://github.com/mic-…
mic-max Feb 15, 2023
c7e2034
Revert "reanme"
mic-max Feb 15, 2023
906a520
remove api
mic-max Feb 15, 2023
519b42c
Update TestOtlpExporter.cs
mic-max Feb 15, 2023
125b523
rename and remove null
mic-max Feb 15, 2023
5c34096
Update AssemblyInfo.cs
mic-max Feb 15, 2023
70c1396
Update OpenTelemetry.Exporter.OpenTelemetryProtocol.PersistentStorage…
mic-max Feb 15, 2023
9be4d87
Address @CodeBlanch 's comments
mic-max Feb 16, 2023
0df6276
Update OtlpTraceExporterPersistentStorageExtensions.cs
mic-max Feb 16, 2023
6af0480
Update OtlpTraceExporterPersistentStorageExtensions.cs
mic-max Feb 16, 2023
cef17ae
remove changes to example project
mic-max Feb 16, 2023
5d764bc
Update TestOtlpExporter.cs
mic-max Feb 16, 2023
5dcf7fd
Create README.md
mic-max Feb 16, 2023
b7fe0ff
Added an internal way to configure options inline with service provider.
CodeBlanch Feb 16, 2023
147217d
Update README.md
mic-max Feb 16, 2023
ec24f45
Add test with mock file provider classes
mic-max Feb 16, 2023
57fdc4d
undo test changes
mic-max Feb 17, 2023
1014de1
add test
mic-max Feb 17, 2023
ad3f250
Update Common.nonprod.props
mic-max Feb 17, 2023
a1e3709
Update OpenTelemetry.Exporter.OpenTelemetryProtocol.PersistentStorage…
mic-max Feb 17, 2023
05e8e3a
Update OtlpTraceExporterTests.cs
mic-max Feb 17, 2023
87ce1fe
Fix name not being passed to internal helper.
CodeBlanch Feb 17, 2023
0edcb07
[Otlp] Make sure Otlp trace and metric exporters have dedicated optio…
CodeBlanch Feb 16, 2023
01b097d
Revert "[Otlp] Make sure Otlp trace and metric exporters have dedicat…
CodeBlanch Feb 17, 2023
b112503
Merge branch 'main-metrics' into otld-persist-failed-exports
CodeBlanch Feb 17, 2023
cb31a8d
Merge branch 'main-metrics' into otld-persist-failed-exports
mic-max Feb 27, 2023
c1c87e5
Update OtlpGrpcTraceExportClient.cs
mic-max Feb 27, 2023
e360ae3
ci rerun
mic-max Feb 27, 2023
38c8e93
Merge branch 'main-metrics' into otld-persist-failed-exports
mic-max Feb 27, 2023
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
1 change: 1 addition & 0 deletions build/Common.nonprod.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<MicrosoftExtensionsLoggingAbstractionsPkgVer>[6.0.0,)</MicrosoftExtensionsLoggingAbstractionsPkgVer>
<MicrosoftNETTestSdkPkgVer>[17.4.1]</MicrosoftNETTestSdkPkgVer>
<MoqPkgVer>[4.18.3,5.0)</MoqPkgVer>
<PersistentStoragePkgVer>1.0.0-beta.1</PersistentStoragePkgVer>
mic-max marked this conversation as resolved.
Show resolved Hide resolved
<RabbitMQClientPkgVer>[6.4.0,7.0)</RabbitMQClientPkgVer>
<RuntimeInstrumentationPkgVer>[1.0.0,2.0)</RuntimeInstrumentationPkgVer>
<SwashbuckleAspNetCorePkgVer>[6.4.0]</SwashbuckleAspNetCorePkgVer>
Expand Down
1 change: 1 addition & 0 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<MicrosoftSourceLinkGitHubPkgVer>[1.1.1,2.0)</MicrosoftSourceLinkGitHubPkgVer>
<OpenTracingPkgVer>[0.12.1,0.13)</OpenTracingPkgVer>
<OTelPreviousStableVer>1.3.2</OTelPreviousStableVer>
<PersistentStoragePkgVer>1.0.0-beta.1</PersistentStoragePkgVer>
<SerilogPkgVer>[2.8.0,3.0)</SerilogPkgVer>
<StyleCopAnalyzersPkgVer>[1.2.0-beta.435,2.0)</StyleCopAnalyzersPkgVer>
<SystemCollectionsImmutablePkgVer>1.4.0</SystemCollectionsImmutablePkgVer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
OpenTelemetry.Exporter.OtlpExporterOptions.StorageDirectory.get -> string
OpenTelemetry.Exporter.OtlpExporterOptions.StorageDirectory.set -> void
OpenTelemetry.Exporter.OtlpExporterOptions.EnableOfflineStorage.get -> bool
OpenTelemetry.Exporter.OtlpExporterOptions.EnableOfflineStorage.set -> void
static OpenTelemetry.Metrics.OtlpMetricExporterExtensions.AddOtlpExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions, OpenTelemetry.Metrics.MetricReaderOptions> configureExporterAndMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder
static OpenTelemetry.Metrics.OtlpMetricExporterExtensions.AddOtlpExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions> configureExporter) -> OpenTelemetry.Metrics.MeterProviderBuilder
*REMOVED*static OpenTelemetry.Trace.OtlpTraceExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions> configure = null) -> OpenTelemetry.Trace.TracerProviderBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
OpenTelemetry.Exporter.OtlpExporterOptions.StorageDirectory.get -> string
OpenTelemetry.Exporter.OtlpExporterOptions.StorageDirectory.set -> void
OpenTelemetry.Exporter.OtlpExporterOptions.EnableOfflineStorage.get -> bool
OpenTelemetry.Exporter.OtlpExporterOptions.EnableOfflineStorage.set -> void
static OpenTelemetry.Metrics.OtlpMetricExporterExtensions.AddOtlpExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions, OpenTelemetry.Metrics.MetricReaderOptions> configureExporterAndMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder
static OpenTelemetry.Metrics.OtlpMetricExporterExtensions.AddOtlpExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions> configureExporter) -> OpenTelemetry.Metrics.MeterProviderBuilder
*REMOVED*static OpenTelemetry.Trace.OtlpTraceExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions> configure = null) -> OpenTelemetry.Trace.TracerProviderBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
OpenTelemetry.Exporter.OtlpExporterOptions.StorageDirectory.get -> string
OpenTelemetry.Exporter.OtlpExporterOptions.StorageDirectory.set -> void
OpenTelemetry.Exporter.OtlpExporterOptions.EnableOfflineStorage.get -> bool
OpenTelemetry.Exporter.OtlpExporterOptions.EnableOfflineStorage.set -> void
static OpenTelemetry.Metrics.OtlpMetricExporterExtensions.AddOtlpExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions, OpenTelemetry.Metrics.MetricReaderOptions> configureExporterAndMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder
static OpenTelemetry.Metrics.OtlpMetricExporterExtensions.AddOtlpExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions> configureExporter) -> OpenTelemetry.Metrics.MeterProviderBuilder
*REMOVED*static OpenTelemetry.Trace.OtlpTraceExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions> configure = null) -> OpenTelemetry.Trace.TracerProviderBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
OpenTelemetry.Exporter.OtlpExporterOptions.StorageDirectory.get -> string
OpenTelemetry.Exporter.OtlpExporterOptions.StorageDirectory.set -> void
OpenTelemetry.Exporter.OtlpExporterOptions.EnableOfflineStorage.get -> bool
OpenTelemetry.Exporter.OtlpExporterOptions.EnableOfflineStorage.set -> void
static OpenTelemetry.Metrics.OtlpMetricExporterExtensions.AddOtlpExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions, OpenTelemetry.Metrics.MetricReaderOptions> configureExporterAndMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder
static OpenTelemetry.Metrics.OtlpMetricExporterExtensions.AddOtlpExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions> configureExporter) -> OpenTelemetry.Metrics.MeterProviderBuilder
*REMOVED*static OpenTelemetry.Trace.OtlpTraceExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.OtlpExporterOptions> configure = null) -> OpenTelemetry.Trace.TracerProviderBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPkgVer)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPkgVer)" PrivateAssets="all" />
<PackageReference Include="OpenTelemetry.Extensions.PersistentStorage" Version="$(PersistentStoragePkgVer)" />
mic-max marked this conversation as resolved.
Show resolved Hide resolved

<Compile Include="$(RepoRoot)\src\OpenTelemetry.Api\Internal\ExceptionExtensions.cs" Link="Includes\ExceptionExtensions.cs" />
<Compile Include="$(RepoRoot)\src\OpenTelemetry.Api\Internal\SemanticConventions.cs" Link="Includes\SemanticConventions.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ public Uri Endpoint
/// </remarks>
public Func<HttpClient> HttpClientFactory { get; set; }

/// <summary>
/// Gets or sets the directory for offline storage.
/// </summary>
public string StorageDirectory { get; set; }

/// <summary>
/// Gets or sets a value indicating whether offline storage should be used.
/// </summary>
public bool EnableOfflineStorage { get; set; }
mic-max marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// Gets a value indicating whether <see cref="Endpoint" /> was modified via its setter.
/// </summary>
Expand Down