Skip to content

feat: integrate OpenTelemetry in opengemini-client-go#234

Open
chenhuansome wants to merge 2 commits intoopenGemini:mainfrom
chenhuansome:opentelemetry-integration
Open

feat: integrate OpenTelemetry in opengemini-client-go#234
chenhuansome wants to merge 2 commits intoopenGemini:mainfrom
chenhuansome:opentelemetry-integration

Conversation

@chenhuansome
Copy link
Contributor

@chenhuansome chenhuansome commented Aug 22, 2025

  1. What is the main purpose of this PR?

Add OpenTelemetry support to the OpenGemini Go client to implement distributed tracing, metric collection, and log aggregation. The data format adheres to the OpenTelemetry protocol (OTLP), and it supports integration with mainstream observability tools such as Prometheus and Jaeger.

  1. What is the purpose of defining interceptor - related interfaces in the code?

The  Interceptor  interface is defined, which includes the  Query  and  Write  methods. It is used to standardize the interception logic for handling query and write operations and provide a standard for subsequent interceptor implementations.

  1. What does  OtelClient  do specifically as an interceptor?

OtelClient  uses OpenTelemetry for distributed tracing. It extracts and injects tracing context before the request and sets relevant attributes; after the request, it records information such as the response status.

  1. How do interceptors work in the logic related to  Client ?

Client  supports adding multiple interceptors. Before and after executing an HTTP request, the closure functions of the interceptors are called in sequence, thereby enhancing the scalability of request processing and allowing additional operations to be inserted during the request lifecycle.

@chenhuansome chenhuansome force-pushed the opentelemetry-integration branch from 9e3ee8c to 44f6a48 Compare August 22, 2025 17:30
@xuthus5
Copy link
Member

xuthus5 commented Aug 23, 2025

the format of the commit message content does not comply with the specifications.

it must be type: content not type:content.

@chenhuansome chenhuansome force-pushed the opentelemetry-integration branch 3 times, most recently from 199c033 to 643330e Compare August 23, 2025 18:17
@chenhuansome chenhuansome changed the title feat: integrate OnenTelemetry in opengemini-client-go feat: integrate OpenTelemetry in opengemini-client-go Aug 24, 2025
@chenhuansome chenhuansome force-pushed the opentelemetry-integration branch from 643330e to b9c267c Compare August 25, 2025 16:26
Signed-off-by: chenhuan <xiangyuyu_2024@qq.com>
Signed-off-by: chenhuan <xiangyuyu_2024@qq.com>
@chenhuansome chenhuansome force-pushed the opentelemetry-integration branch from b9c267c to 17c6bb0 Compare August 27, 2025 10:45
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.

2 participants