-
Notifications
You must be signed in to change notification settings - Fork 858
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement logging-otlp exporter providers (#4992)
- Loading branch information
Showing
12 changed files
with
124 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...ava/io/opentelemetry/exporter/logging/otlp/internal/LoggingLogRecordExporterProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.exporter.logging.otlp.internal; | ||
|
||
import io.opentelemetry.exporter.logging.otlp.OtlpJsonLoggingLogRecordExporter; | ||
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; | ||
import io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider; | ||
import io.opentelemetry.sdk.logs.export.LogRecordExporter; | ||
|
||
/** | ||
* {@link LogRecordExporter} SPI implementation for {@link OtlpJsonLoggingLogRecordExporter}. | ||
* | ||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
public class LoggingLogRecordExporterProvider implements ConfigurableLogRecordExporterProvider { | ||
@Override | ||
public LogRecordExporter createExporter(ConfigProperties config) { | ||
return OtlpJsonLoggingLogRecordExporter.create(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "logging-otlp"; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...n/java/io/opentelemetry/exporter/logging/otlp/internal/LoggingMetricExporterProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.exporter.logging.otlp.internal; | ||
|
||
import io.opentelemetry.exporter.logging.otlp.OtlpJsonLoggingMetricExporter; | ||
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; | ||
import io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider; | ||
import io.opentelemetry.sdk.metrics.export.MetricExporter; | ||
|
||
/** | ||
* {@link MetricExporter} SPI implementation for {@link OtlpJsonLoggingMetricExporter}. | ||
* | ||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
public class LoggingMetricExporterProvider implements ConfigurableMetricExporterProvider { | ||
@Override | ||
public MetricExporter createExporter(ConfigProperties config) { | ||
return OtlpJsonLoggingMetricExporter.create(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "logging-otlp"; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...ain/java/io/opentelemetry/exporter/logging/otlp/internal/LoggingSpanExporterProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.exporter.logging.otlp.internal; | ||
|
||
import io.opentelemetry.exporter.logging.otlp.OtlpJsonLoggingSpanExporter; | ||
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; | ||
import io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider; | ||
import io.opentelemetry.sdk.trace.export.SpanExporter; | ||
|
||
/** | ||
* {@link SpanExporter} SPI implementation for {@link OtlpJsonLoggingSpanExporter}. | ||
* | ||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
public class LoggingSpanExporterProvider implements ConfigurableSpanExporterProvider { | ||
@Override | ||
public SpanExporter createExporter(ConfigProperties config) { | ||
return OtlpJsonLoggingSpanExporter.create(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "logging-otlp"; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ervices/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
io.opentelemetry.exporter.logging.otlp.internal.LoggingLogRecordExporterProvider |
1 change: 1 addition & 0 deletions
1
...ervices/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
io.opentelemetry.exporter.logging.otlp.internal.LoggingMetricExporterProvider |
1 change: 1 addition & 0 deletions
1
...F/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
io.opentelemetry.exporter.logging.otlp.internal.LoggingSpanExporterProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters