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 oltp(http&grpc) trace support #2641

Merged
merged 5 commits into from
May 29, 2023
Merged

add oltp(http&grpc) trace support #2641

merged 5 commits into from
May 29, 2023

Conversation

houseme
Copy link
Member

@houseme houseme commented May 11, 2023

http and grpc

https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/jaegerexporter/README.md
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.85.0/exporter/jaegerexporter/README.md
https://opentelemetry.io/blog/2022/jaeger-native-otlp/
https://www.jaegertracing.io/docs/1.45/apis/#opentelemetry-protocol-stable
https://opentelemetry.io/docs/specs/otel/sdk-environment-variables/#jaeger-exporter

Resean:

Jaeger exporter support will be removed from OpenTelemetry in July 2023.

Note: Jaeger supports the [OpenTelemetry protocol natively](https://www.jaegertracing.io/docs/latest/apis/#opentelemetry-protocol-stable) and most users should export to Jaeger using OTLP. These environment variables remain here only for backwards compatibility and will be removed in a future version. SDKs MAY include Jaeger exporters, but Jaeger export is not required.

OpenTelemetry Protocol (stable)

Since v1.35, the Jaeger backend can receive trace data from the OpenTelemetry SDKs in their native [OpenTelemetry Protocol (OTLP)](https://opentelemetry.io/docs/reference/specification/protocol/). It is no longer necessary to configure the OpenTelemetry SDKs with Jaeger exporters, nor deploy the OpenTelemetry jaeger-collectors between the OpenTelemetry SDKs and the Jaeger backend.

The OTLP data is accepted in these formats: (1) binary gRPC, (2) Protobuf over HTTP, (3) JSON over HTTP. For more details on the OTLP receiver see the [official documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/otlpreceiver/README.md) (note that not all configuration options are supported in jaeger-collector, and only tracing data is accepted, since Jaeger does not store other telemetry types).

@houseme houseme requested review from gqcn and hailaz May 11, 2023 15:46
@gqcn
Copy link
Member

gqcn commented May 12, 2023

@houseme 目前框架的httpgrpc Server已经内嵌支持了otel的,你这个pr主要是拿来干什么呢?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@houseme The http and grpc Server of the current framework have built-in support for otel, what is your PR mainly for?

@houseme
Copy link
Member Author

houseme commented May 12, 2023

@houseme 目前框架的httpgrpc Server已经内嵌支持了otel的,你这个pr主要是拿来干什么呢?

支持otel自己的,多种上报方式,Jaeger exporter 要移除了
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/jaegerexporter/README.md
https://opentelemetry.io/blog/2022/jaeger-native-otlp/
https://www.jaegertracing.io/docs/1.45/apis/#opentelemetry-protocol-stable
https://opentelemetry.io/docs/specs/otel/sdk-environment-variables/#jaeger-exporter

Jaeger exporter support will be removed from OpenTelemetry in July 2023.

Note: Jaeger supports the [OpenTelemetry protocol natively](https://www.jaegertracing.io/docs/latest/apis/#opentelemetry-protocol-stable) and most users should export to Jaeger using OTLP. These environment variables remain here only for backwards compatibility and will be removed in a future version. SDKs MAY include Jaeger exporters, but Jaeger export is not required.

@Issues-translate-bot
Copy link

Issues-translate-bot commented May 12, 2023

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@houseme The http and grpc Server of the current framework have built-in support for otel, what is your PR mainly for?

Support otel's own, multiple reporting methods, jaeger will be removed

@codecov-commenter
Copy link

codecov-commenter commented May 12, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (8792836) 78.82% compared to head (61348e8) 78.83%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2641   +/-   ##
=======================================
  Coverage   78.82%   78.83%           
=======================================
  Files         631      631           
  Lines       51730    51730           
=======================================
+ Hits        40776    40779    +3     
+ Misses       8933     8930    -3     
  Partials     2021     2021           
Flag Coverage Δ
go-1.15-386 78.86% <ø> (+0.03%) ⬆️
go-1.15-amd64 78.88% <ø> (+0.03%) ⬆️
go-1.16-386 78.87% <ø> (+0.02%) ⬆️
go-1.16-amd64 78.87% <ø> (+0.04%) ⬆️
go-1.17-386 78.87% <ø> (+0.02%) ⬆️
go-1.17-amd64 78.86% <ø> (+0.02%) ⬆️
go-1.18-386 78.77% <ø> (+<0.01%) ⬆️
go-1.18-amd64 78.79% <ø> (+<0.01%) ⬆️
go-1.19-386 78.88% <ø> (?)
go-1.19-amd64 78.86% <ø> (?)
go-1.20-386 78.81% <ø> (?)
go-1.20-amd64 78.79% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@houseme
Copy link
Member Author

houseme commented May 22, 2023

@gqcn

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@gqcn

contrib/trace/otlpgrpc/otlpgrpc.go Outdated Show resolved Hide resolved
contrib/trace/otlpgrpc/otlpgrpc.go Outdated Show resolved Hide resolved
contrib/trace/otlpgrpc/go.mod Show resolved Hide resolved
contrib/trace/otlpgrpc/otlpgrpc.go Outdated Show resolved Hide resolved
contrib/trace/otlphttp/otlphttp.go Outdated Show resolved Hide resolved
contrib/trace/otlphttp/otlphttp.go Outdated Show resolved Hide resolved
contrib/trace/otlphttp/otlphttp.go Outdated Show resolved Hide resolved
example/trace/otlp/README.md Outdated Show resolved Hide resolved
@houseme houseme requested a review from gqcn May 24, 2023 02:16
@gqcn gqcn changed the title feat: create oltp trace add oltp(http&grpc) trace support May 29, 2023
@gqcn gqcn merged commit d3a3ad0 into master May 29, 2023
@gqcn gqcn deleted the feature/otlp branch May 29, 2023 02:00
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.

4 participants