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

Integrate Jaeger gRPC collector #2976

Merged
merged 21 commits into from
Dec 4, 2019
Merged

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Nov 27, 2019

fixes #2962

TODO:

  • Add tests for jaeger collector
  • Make gRPC port configurable

Switched to implement the jaeger collector ourselves instead of using otel jaegerreceiver, allowing us to have more control over the gRPC server.

Points to consider from Jaeger collector

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

beater/server.go Outdated Show resolved Hide resolved
beater/otcollector.go Outdated Show resolved Hide resolved
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking more into what is missing, I now went down the road of not using the jaegerreceiver directly, but implementing the jaeger protobuf contract and starting a grpc server on our own. We still use some open-telemetry functions, but have full control over the grpc server. This is still only a draft, to see which direction we should go.
@axw please let me know what you think

(GitHub won't let me respond inline...)

I think that's the best option, at least for the near term.

beater/otel.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Dec 2, 2019

Codecov Report

❗ No coverage uploaded for pull request base (jaeger@89b965a). Click here to learn what that means.
The diff coverage is 76.71%.

@@            Coverage Diff            @@
##             jaeger    #2976   +/-   ##
=========================================
  Coverage          ?   78.01%           
=========================================
  Files             ?       93           
  Lines             ?     4735           
  Branches          ?        0           
=========================================
  Hits              ?     3694           
  Misses            ?     1041           
  Partials          ?        0
Impacted Files Coverage Δ
beater/api/root/handler.go 100% <ø> (ø)
beater/api/profile/handler.go 81.73% <ø> (ø)
beater/api/config/agent/handler.go 94.87% <ø> (ø)
beater/api/asset/sourcemap/handler.go 100% <ø> (ø)
beater/api/intake/handler.go 100% <ø> (ø)
beater/request/result.go 86.79% <100%> (ø)
beater/beater.go 69.75% <100%> (ø)
beater/http.go 67.92% <67.92%> (ø)
beater/server.go 70.83% <71.73%> (ø)
beater/config/config.go 65.95% <77.77%> (ø)
... and 3 more

@simitt simitt marked this pull request as ready for review December 2, 2019 15:00
_meta/beat.yml Outdated Show resolved Hide resolved
_meta/beat.yml Outdated Show resolved Hide resolved
beater/otel.go Outdated Show resolved Hide resolved
beater/otel.go Outdated Show resolved Hide resolved
beater/otel.go Outdated Show resolved Hide resolved
beater/otel.go Outdated Show resolved Hide resolved
beater/otel_test.go Outdated Show resolved Hide resolved
beater/otel.go Outdated Show resolved Hide resolved
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a handful of very minor cosmetic issues, and what I guess is an accidental use of legacy golang.org/x/net/context.

beater/api/jaeger/grpc_test.go Outdated Show resolved Hide resolved
beater/config/jaeger_test.go Outdated Show resolved Hide resolved
beater/http.go Outdated Show resolved Hide resolved
beater/jaeger/grpc.go Show resolved Hide resolved
beater/jaeger/grpc.go Outdated Show resolved Hide resolved
beater/server.go Outdated Show resolved Hide resolved
@simitt simitt merged commit fa07443 into elastic:jaeger Dec 4, 2019
axw added a commit that referenced this pull request Jan 9, 2020
* Integrate Jaeger gRPC collector (#2976)

Add support for Jaeger gRPC Trace Intake Collector. The gRPC endpoint collects monitoring metrics and supports TLS communication, by reusing the `apm-server.ssl.*` configuration. By default the gRPC endpoint is disabled.

closes #2962 

Co-Authored-By: Andrew Wilkins <[email protected]>

* [Jaeger] Add otel consumer converting batches to Elastic APM events (#3066)

Add consumer converting incoming otel batches to Elastic APM format.
Add integration tests covering incoming gRPC requests being transformed to beat events.

partially implements #3307

* Jaeger http thrift (#3081)

Add an HTTP handler, muxer, and server, in beater/jaeger for accepting Thrift-encoded trace data over HTTP. Refactor beater/jaeger.GRPCServer into Server, which now encapsulates both gRPC and HTTP servers.

Move beater/api/jaeger code into beater/jaeger, which is the only user of GRPCCollector. If the beater/jaeger code grows significantly, we might consider having subpackages like beater/jaeger/grpc, beater/jaeger/http, etc.

* [jaeger] Convert Timeevents to errors (#3085)

* [jaeger] Convert Timeevents to errors

Parse Timeevents from Jaeger spans and convert to elastic error events
if they describe an error.

Fixes #3007

* Add experimental flag to Jaeger integration (#3121)

* tests/system: system test for Jaeger Thrift/HTTP (#3114)

* tests/system: system test for Jaeger Thrift/HTTP

* tests/system: system test for Jaeger gRPC

* processor/otel: update approvals

Co-authored-by: Silvia Mitter <[email protected]>
simitt added a commit to simitt/apm-server that referenced this pull request Jan 14, 2020
Add support for Jaeger gRPC Trace Intake Collector. The gRPC endpoint collects monitoring metrics and supports TLS communication, by reusing the `apm-server.ssl.*` configuration. By default the gRPC endpoint is disabled.

closes elastic#2962

Co-Authored-By: Andrew Wilkins <[email protected]>
simitt added a commit that referenced this pull request Jan 14, 2020
* Integrate Jaeger gRPC collector (#2976)

Add support for Jaeger gRPC Trace Intake Collector. The gRPC endpoint collects monitoring metrics and supports TLS communication, by reusing the `apm-server.ssl.*` configuration. By default the gRPC endpoint is disabled.

closes #2962

Co-Authored-By: Andrew Wilkins <[email protected]>

* [Jaeger] Add otel consumer converting batches to Elastic APM events (#3066)

Add consumer converting incoming otel batches to Elastic APM format.
Add integration tests covering incoming gRPC requests being transformed to beat events.

partially implements #3307

* Jaeger http thrift (#3081)

Add an HTTP handler, muxer, and server, in beater/jaeger for accepting Thrift-encoded trace data over HTTP. Refactor beater/jaeger.GRPCServer into Server, which now encapsulates both gRPC and HTTP servers.

Move beater/api/jaeger code into beater/jaeger, which is the only user of GRPCCollector. If the beater/jaeger code grows significantly, we might consider having subpackages like beater/jaeger/grpc, beater/jaeger/http, etc.

* [jaeger] Convert Timeevents to errors (#3085)

* [jaeger] Convert Timeevents to errors

Parse Timeevents from Jaeger spans and convert to elastic error events
if they describe an error.

Fixes #3007

* Add experimental flag to Jaeger integration (#3121)

* tests/system: system test for Jaeger Thrift/HTTP (#3114)

* tests/system: system test for Jaeger Thrift/HTTP

* tests/system: system test for Jaeger gRPC

Co-authored-by: Andrew Wilkins <[email protected]>
@simitt simitt deleted the 2962-grpc-jaeger branch February 10, 2020 17:35
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.

3 participants