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

Logs Implement #3442

Closed
wants to merge 4 commits into from
Closed

Logs Implement #3442

wants to merge 4 commits into from

Conversation

fuaiyi
Copy link
Contributor

@fuaiyi fuaiyi commented Nov 26, 2022

Background

Our company is also using OpenTelemetry standard for observability. I have been paying attention to the construction of OpenTelemetry, but I found that the Logs capability is not provided. so we developed the implementation of Logs by referring to the design standard. Recently, the community started developing Logs after the Metric stable release was completed. so I want to contribute the code that has been done with reference to the community's latest specifications and style, as well as the recent implementation of Logs in java, to build on and improve the capability of Logs. Accelerate the building of Logs capability so that developers like me can use the stable version of OpenTelemetry capability sooner rather than later. Welcome to participate in the CR and discussion.

PR

This PR is mainly to develop and improve the Logs signal ecology, including the following contents (there are a lot of contents, CR can be divided into modules).

  • api-logs
  • sdk-logs
  • exporter-logs-otlp-http

api-logs

Module directory: experimental/packages/API - logs
Detail: in the process of development, it is found that the existing api-logs (v0.34.0) is inconsistent with the design standard and fails to meet part of the sdk capabilities, so a part of the code is reconstructed after referring to the design standard and java implementation. The main details are as follows:

  1. delete LogEvent
  2. Logger implements: emitLogRecord -> modification; getLogRecord; emitEvent -> getLogEvent
  3. LogRecord modification (I think the LogRecord in api should provide the corresponding method and configuration, rather than the specific data model, can refer to the implementation in Trace)
  4. implementation of NoopLogger
  5. add NoopLogRecord
  6. modify the unit test
  7. modify README

sdk-logs

Module directory: experimental/packages/sdk-logs、packages/opentelemetry-core/src/utils
Detail: this module is a completely new module. According to the design standards of sdk and the implementation of java, the Logs SDK complete capability is completed. The functions are as follows:

  1. LoggerProvider
  2. Logger
  3. LogRecord
  4. ReadableLogRecord
  5. LogRecordProcessor
  6. SimpleLogRecordProcessor
  7. BatchLogRecordProcessor
  8. LogRecordExporter
  9. ConslogLogRecordExporter
  10. InMemoryLogRecordExporter
  11. complete unit test
  12. README
  13. example of useage
  14. add callWithTimeout tool method to @opentelemetry/core (see this method is used by Trace/Metric/Log, subsequent responsible person can directly replace the corresponding code with the method in core)

exporter-logs-otlp-http

Module directory: experimental/packages/exporter-logs-otlp-http、experimental/packages/otlp-transformer
Note: this module is completely new. It implements the full capabilities of exporter- OTLP-HTTP in accordance with the design standards of exporter-otlp and with reference to the java implementation. The functions are as follows:

  1. OTLPLogExporter - web
  2. OTLPLogExporter - node
  3. logs-otlp-http implement in otlp-transformer
  4. complete unit test
  5. README

@fuaiyi fuaiyi requested a review from a team as a code owner November 26, 2022 16:50
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 26, 2022

CLA Missing ID CLA Not Signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant