@@ -11,9 +11,9 @@ implementation.
1111<summary >Table of Contents</summary >
1212
1313* [ Installation] ( #installation )
14- * [ Enable Trace Exporter] ( #enable-trace-exporter )
15- * [ Enable Metric Exporter] ( #enable-metric-exporter )
1614* [ Enable Log Exporter] ( #enable-log-exporter )
15+ * [ Enable Metric Exporter] ( #enable-metric-exporter )
16+ * [ Enable Trace Exporter] ( #enable-trace-exporter )
1717* [ Configuration] ( #configuration )
1818 * [ OtlpExporterOptions] ( #otlpexporteroptions )
1919 * [ LogRecordExportProcessorOptions] ( #logrecordexportprocessoroptions )
@@ -37,45 +37,6 @@ implementation.
3737dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol
3838```
3939
40- ## Enable Trace Exporter
41-
42- This exporter provides ` AddOtlpExporter() ` extension method on ` TracerProviderBuilder `
43- to enable exporting of traces. The following snippet adds the Exporter with default
44- [ configuration] ( #configuration ) .
45-
46- ``` csharp
47- var tracerProvider = Sdk .CreateTracerProviderBuilder ()
48- // rest of config not shown here.
49- .AddOtlpExporter ()
50- .Build ();
51- ```
52-
53- See the [ ` TestOtlpExporter.cs ` ] ( ../../examples/Console/TestOtlpExporter.cs ) for
54- runnable example.
55-
56- ## Enable Metric Exporter
57-
58- This exporter provides ` AddOtlpExporter() ` extension method on ` MeterProviderBuilder `
59- to enable exporting of metrics. The following snippet adds the Exporter with default
60- [ configuration] ( #configuration ) .
61-
62- ``` csharp
63- var meterProvider = Sdk .CreateMeterProviderBuilder ()
64- // rest of config not shown here.
65- .AddOtlpExporter ()
66- .Build ();
67- ```
68-
69- By default, ` AddOtlpExporter() ` pairs the OTLP MetricExporter with a
70- [ PeriodicExportingMetricReader] ( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#periodic-exporting-metricreader )
71- with metric export interval of 60 secs and
72- [ Temporality] ( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#temporality )
73- set as ` Cumulative ` . See
74- [ ` TestMetrics.cs ` ] ( ../../examples/Console/TestMetrics.cs ) for example on how to
75- customize the ` MetricReaderOptions ` or see the [ Environment
76- Variables] ( #environment-variables ) section below on how to customize using
77- environment variables.
78-
7940## Enable Log Exporter
8041
8142``` csharp
@@ -109,6 +70,45 @@ setting on `OpenTelemetryLoggerOptions`.
10970> Scope attributes with key set as empty string or ` {OriginalFormat} `
11071 are ignored by exporter. Duplicate keys are exported as is.
11172
73+ ## Enable Metric Exporter
74+
75+ This exporter provides ` AddOtlpExporter() ` extension method on ` MeterProviderBuilder `
76+ to enable exporting of metrics. The following snippet adds the Exporter with default
77+ [ configuration] ( #configuration ) .
78+
79+ ``` csharp
80+ var meterProvider = Sdk .CreateMeterProviderBuilder ()
81+ // rest of config not shown here.
82+ .AddOtlpExporter ()
83+ .Build ();
84+ ```
85+
86+ By default, ` AddOtlpExporter() ` pairs the OTLP MetricExporter with a
87+ [ PeriodicExportingMetricReader] ( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#periodic-exporting-metricreader )
88+ with metric export interval of 60 secs and
89+ [ Temporality] ( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#temporality )
90+ set as ` Cumulative ` . See
91+ [ ` TestMetrics.cs ` ] ( ../../examples/Console/TestMetrics.cs ) for example on how to
92+ customize the ` MetricReaderOptions ` or see the [ Environment
93+ Variables] ( #environment-variables ) section below on how to customize using
94+ environment variables.
95+
96+ ## Enable Trace Exporter
97+
98+ This exporter provides ` AddOtlpExporter() ` extension method on ` TracerProviderBuilder `
99+ to enable exporting of traces. The following snippet adds the Exporter with default
100+ [ configuration] ( #configuration ) .
101+
102+ ``` csharp
103+ var tracerProvider = Sdk .CreateTracerProviderBuilder ()
104+ // rest of config not shown here.
105+ .AddOtlpExporter ()
106+ .Build ();
107+ ```
108+
109+ See the [ ` TestOtlpExporter.cs ` ] ( ../../examples/Console/TestOtlpExporter.cs ) for
110+ runnable example.
111+
112112## Configuration
113113
114114You can configure the ` OtlpExporter ` through ` OtlpExporterOptions `
0 commit comments