Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Emily-Jiang committed Feb 20, 2024
1 parent a6010c1 commit 402a047
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
43 changes: 43 additions & 0 deletions spec/src/main/asciidoc/logs.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// 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. The following shows the entry points.

[source,java]
----
LoggerProvider (provider.loggerBuilder(instrumentationScopeName)
-> LoggerBuilder (loggerBuilder.build())
->Logger (logger.logRecordBuilder)
->LogRecordBuilder
----

=== Access to the OpenTelemetry Logs API
An implementation of MicroProfile Telemetry Logs MUST provide the following CDI beans for supporting contextual instance injection:

* `io.opentelemetry.api.logs.LoggerProvider`

[source,java]
----
@Inject LoggerProvider provider;
----



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
8 changes: 2 additions & 6 deletions spec/src/main/asciidoc/opentelemetry-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ Baggage API::
* https://www.javadoc.io/static/io.opentelemetry/opentelemetry-api/{otel-java-version}/io/opentelemetry/api/baggage/propagation/package-summary.html[io.opentelemetry.api.baggage.propagation]
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.
=====
Logs API::
* https://www.javadoc.io/static/io.opentelemetry/opentelemetry-api/{otel-java-version}/io/opentelemetry/api/logs/package-summary.html[io.opentelemetry.api.logs]

=== Context API

Expand Down

0 comments on commit 402a047

Please sign in to comment.