-
Notifications
You must be signed in to change notification settings - Fork 519
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 support for receiving traces over OTLP/gRPC #4677
Conversation
💔 Build Failed
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
Add the gRPC service for receiving OTLP traces, and plumb it through to processor/otel. Auth works by setting the "Authorization" header (gRPC request metadata) like in HTTP requests.
jenkins run the tests please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I teseted it through as described - works as expected
@bmorelli25 I run a small local app in go, basically following https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp#example-package-Insecure. |
Test failure is unrelated, see #4692 |
Add the gRPC service for receiving OTLP traces, and plumb it through to processor/otel. Auth works by setting the "Authorization" header (gRPC request metadata) like in HTTP requests. # Conflicts: # NOTICE.txt # changelogs/head.asciidoc
Add the gRPC service for receiving OTLP traces, and plumb it through to processor/otel. Auth works by setting the "Authorization" header (gRPC request metadata) like in HTTP requests. # Conflicts: # NOTICE.txt # changelogs/head.asciidoc
I have successfully tested traces and metrics with
receivers:
otlp:
protocols:
grpc:
endpoint: '127.0.0.1:4317'
hostmetrics:
collection_interval: 1m
scrapers:
# cpu not supported on MacOS
# cpu:
load:
memory:
processors:
batch: null
exporters:
logging:
loglevel: info
prometheus:
endpoint: 0.0.0.0:8889
otlp/elastic:
endpoint: "localhost:8200"
insecure: true
headers:
Authorization: "Bearer my_secret_token"
service:
pipelines:
metrics:
receivers:
- otlp
- hostmetrics
exporters:
- prometheus
- otlp/elastic
traces:
receivers:
- otlp
processors:
- batch
exporters:
- otlp/elastic
|
Thanks for testing it out @cyrille-leclerc! |
Tested with BC 2 - Worked with the elastic and the otel exporter. |
Hello team, In this page, as well as in the official APM doc: https://www.elastic.co/guide/en/apm/guide/current/open-telemetry-direct.html#instrument-apps-otel We see this example being used every time: Is it possible to make this example Thank you |
@patpatpat123 I don't know if there even is any such code, or if it was just a made up example class name. If you're looking for a demo application to instrument with OpenTelemetry, then you should consider using OpenTelemetry Demo: https://github.com/open-telemetry/opentelemetry-demo |
Motivation/summary
Add the gRPC service for receiving OTLP traces, and plumb it through to
processor/otel
. Once this lands we can follow up with:We use an interceptor for ensuring clients are authorised. Auth works by setting the "Authorization" header (gRPC request metadata) just like in HTTP requests.
Checklist
- [ ] Documentation has been updated(I will create a separate issue for this)How to test these changes
insecure: true
in the exporter config, unless APM Server is configured to use TLS.headers: {'Authorization': 'Bearer secret_token'}
, restart opentelemetry-collectorRelated issues
#4503