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

Add logs #158

Merged
merged 3 commits into from
Apr 9, 2024
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
79 changes: 78 additions & 1 deletion spec/src/main/asciidoc/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ Default value: `otlp`

|`otel.metrics.exporter`
| List of exporters to be used for metrics, separated by commas.
`none` means no autoconfigured exporter.
Values other than `none` and `otlp` might link:#sec:service-loader-support[require additional libraries]

Default value: `otlp`

|`otel.logs.exporter`
| List of exporters to be used for logs, separated by commas.
`none` means no autoconfigured exporter.
Emily-Jiang marked this conversation as resolved.
Show resolved Hide resolved
Values other than `none` and `otlp` might link:#sec:service-loader-support[require additional libraries]

Default value: `otlp`
Expand Down Expand Up @@ -180,9 +188,31 @@ Default value: `TRACE_BASED`
| `otel.metric.export.interval`
| The interval, in milliseconds, between the start of two export attempts.

Default value: `60000`
2+h| Batch log record processor

| `otel.blrp.schedule.delay`
| The interval, in milliseconds, between two consecutive exports.

Default value: `1000`

| `otel.blrp.max.queue.size`
| The maximum batch size.

Default value: `512`

| `otel.blrp.max.export.batch.size`
| The maximum queue size.

Default value: `2048`

| `otel.blrp.export.timeout`
| The maximum allowed time, in milliseconds, to export data.

Default value: `30000`

|===


If Environment Config Source is enabled for MicroProfile Config, then the environment variables as described by the OpenTelemetry SDK Autoconfigure are also supported.

=== Optional Configuration Properties
Expand All @@ -207,6 +237,12 @@ Options include grpc and http/protobuf.

Default value: `grpc`

| `otel.exporter.otlp.logs.protocol`
| The transport protocol to use on OTLP log requests.
Options include grpc and http/protobuf.

Default value: `grpc`

| `otel.exporter.otlp.traces.endpoint`
| The OTLP traces endpoint to connect to.
MUST be a URL with a scheme of either http or https based on the use of TLS.
Expand All @@ -219,6 +255,12 @@ MUST be a URL with a scheme of either http or https based on the use of TLS.

Default value: `http://localhost:4317` when protocol is `grpc`, and `http://localhost:4318/v1/metrics` when protocol is `http/protobuf`

| `otel.exporter.otlp.logs.endpoint`
| The OTLP logs endpoint to connect to.
MUST be a URL with a scheme of either http or https based on the use of TLS.

Default value: `http://localhost:4317` when protocol is `grpc`, and `http://localhost:4318/v1/logs` when protocol is `http/protobuf`

| `otel.exporter.otlp.traces.certificate`
| The path to the file containing trusted certificates to use when verifying an OTLP trace server's TLS credentials.
The file SHOULD contain one or more X.509 certificates in PEM format.
Expand All @@ -231,6 +273,12 @@ The file SHOULD contain one or more X.509 certificates in PEM format.

By default the host platform's trusted root certificates are used.

| `otel.exporter.otlp.logs.certificate`
| The path to the file containing trusted certificates to use when verifying an OTLP log server's TLS credentials.
The file SHOULD contain one or more X.509 certificates in PEM format.

By default the host platform's trusted root certificates are used.

| `otel.exporter.otlp.traces.client.key`
| The path to the file containing private client key to use when verifying an OTLP trace client's TLS credentials.
The file SHOULD contain one private key PKCS8 PEM format.
Expand All @@ -243,6 +291,12 @@ The file SHOULD contain one private key PKCS8 PEM format.

By default no client key file is used.

| `otel.exporter.otlp.logs.client.key`
| The path to the file containing private client key to use when verifying an OTLP log client's TLS credentials.
The file SHOULD contain one private key PKCS8 PEM format.

By default no client key file is used.

| `otel.exporter.otlp.traces.client.certificate`
| The path to the file containing trusted certificates to use when verifying an OTLP trace server's TLS credentials.
The file SHOULD contain one or more X.509 certificates in PEM format.
Expand All @@ -255,12 +309,21 @@ The file SHOULD contain one or more X.509 certificates in PEM format.

By default no chain file is used.

| `otel.exporter.otlp.logs.client.certificate`
| The path to the file containing trusted certificates to use when verifying an OTLP log server's TLS credentials.
The file SHOULD contain one or more X.509 certificates in PEM format.

By default no chain file is used.

| `otel.exporter.otlp.traces.headers`
| Key-value pairs separated by commas to pass as request headers on OTLP trace requests.

| `otel.exporter.otlp.metrics.headers`
| Key-value pairs separated by commas to pass as request headers on OTLP metric requests.

| `otel.exporter.otlp.logs.headers`
| Key-value pairs separated by commas to pass as request headers on OTLP log requests.

| `otel.exporter.otlp.traces.compression`
| The compression type to use on OTLP trace requests.
Options include `gzip`.
Expand All @@ -273,6 +336,12 @@ Options include `gzip`.

By default no compression will be used.

| `otel.exporter.otlp.logs.compression`
| The compression type to use on OTLP log requests.
Options include `gzip`.

By default no compression will be used.

| `otel.exporter.otlp.traces.timeout`
| The maximum waiting time, in milliseconds, allowed to send each OTLP trace batch.

Expand All @@ -283,6 +352,11 @@ Default value: `10000`

Default value: `10000`

| `otel.exporter.otlp.logs.timeout`
| The maximum waiting time, in milliseconds, allowed to send each OTLP log batch.

Default value: `10000`

|===

[[sec:service-loader-support]]
Expand Down Expand Up @@ -313,6 +387,9 @@ The following components are supported

| https://javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi/{otel-java-version}/io/opentelemetry/sdk/autoconfigure/spi/metrics/ConfigurableMetricExporterProvider.html[`ConfigurableMetricExporterProvider`]
| Provides implementation for a name referred in `otel.metrics.exporter`

| https://javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi/{otel-java-version}/io/opentelemetry/sdk/autoconfigure/spi/logs/ConfigurableLogRecordExporterProvider.html[`ConfigurableLogRecordExporterProvider`]
| Provides implementation for a name referred in `otel.logs.exporter`
|===

Behavior when multiple implementations are found for a given component name is undefined.
Expand Down
22 changes: 22 additions & 0 deletions spec/src/main/asciidoc/logs.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// Copyright (c) 2024 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

[[logs]]
== Logs
The OpenTelemetry Logs bridge API exists to enable bridging logs from other log frameworks (e.g. SLF4J, Log4j, JUL, Logback, etc) into OpenTelemetry. It does not define new Log APIs and the Logs bridge APIs in OpenTelemetry are not for application but for runtime to bridge log frameworks. Therefore, this specification does not expose any Log APIs.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ include::introduction.adoc[]
include::integration.adoc[]
include::tracing.adoc[]
include::metrics.adoc[]
include::logs.adoc[]
include::configuration.adoc[]
include::opentelemetry-apis.adoc[]
include::release-notes.adoc[]
Expand Down
6 changes: 0 additions & 6 deletions spec/src/main/asciidoc/opentelemetry-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ Baggage API::
Metrics API::
* https://www.javadoc.io/static/io.opentelemetry/opentelemetry-api/{otel-java-version}/io/opentelemetry/api/metrics/package-summary.html[io.opentelemetry.api.metrics]


[NOTE]
=====
`io.opentelemetry.api` does depend on https://www.javadoc.io/static/io.opentelemetry/opentelemetry-api/{otel-java-version}/io/opentelemetry/api/logs/package-summary.html[io.opentelemetry.api.logs], though this specification only supports the parts that relate to Tracing and Metrics.
=====

=== Context API

* https://www.javadoc.io/static/io.opentelemetry/opentelemetry-context/{otel-java-version}/io/opentelemetry/context/package-summary.html[io.opentelemetry.context]
Expand Down