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

Implement OTLP/HTTP receiver #881

Closed
tigrannajaryan opened this issue Apr 27, 2020 · 8 comments
Closed

Implement OTLP/HTTP receiver #881

tigrannajaryan opened this issue Apr 27, 2020 · 8 comments
Assignees

Comments

@tigrannajaryan
Copy link
Member

tigrannajaryan commented Apr 27, 2020

See protocol spec https://github.com/open-telemetry/oteps/blob/master/text/0099-otlp-http.md

This needs to listen on the same port as existing OTLP/gRPC and be part of the same "otlp" receiver.

@tigrannajaryan
Copy link
Member Author

@tigrannajaryan tigrannajaryan added the help wanted Good issue for contributors to OpenTelemetry Service to pick up label May 8, 2020
@kirbyquerby
Copy link
Member

May I work on this?

@tigrannajaryan
Copy link
Member Author

@kirbyquerby sure, that would be great! I think this is going to be your first contribution, so please read https://github.com/open-telemetry/opentelemetry-collector/blob/master/CONTRIBUTING.md#coding-guidelines

@tigrannajaryan tigrannajaryan removed the help wanted Good issue for contributors to OpenTelemetry Service to pick up label May 14, 2020
@tigrannajaryan
Copy link
Member Author

@kirbyquerby if there is anything unclear in the OTLP/HTTP spec please let me know, I will be happy to clarify.

@odeke-em
Copy link
Member

Just for a bit of current context, in the collector

func (ocr *Receiver) httpServer() *http.Server {
ocr.mu.Lock()
defer ocr.mu.Unlock()
if ocr.serverHTTP == nil {
var mux http.Handler = ocr.gatewayMux
if len(ocr.corsOrigins) > 0 {
co := cors.Options{AllowedOrigins: ocr.corsOrigins}
mux = cors.New(co).Handler(mux)
}
ocr.serverHTTP = &http.Server{Handler: mux}
}

we've already got HTTP(1.1, 2.0) + JSON being received, perhaps this issue could be to expand and receive content that's protobuf as well, or perhaps please update that @tigrannajaryan in the prior art section? We use that endpoint over HTTP to receive traces and metrics from OpenCensus-Web plus other apps like Go tools telemetry.

@tigrannajaryan
Copy link
Member Author

@odeke-em I think you are referring to gRPC-Web transport, right? I am not familiar with it but from what I remember it allows to use JSON representation of ProtoBufs to make the life of webapps easier (correct me if I am wrong). I think we should be able to support it on the same receiver port but for now OTLP/HTTP only specifies the behavior for binary Protobuf payloads. We can extend OTLP spec to allow JSON payloads too.

@tigrannajaryan
Copy link
Member Author

tigrannajaryan commented May 14, 2020

I suggest that in the scope of this issue we implement what the spec says and we can add JSON payload support later.

kirbyquerby added a commit to kirbyquerby/opentelemetry-collector that referenced this issue May 17, 2020
This change adds application/x-protobuf support to the existing
grpc-gateway mux in the OTLP receiver.

See: https://github.com/open-telemetry/oteps/blob/master/text/0099-otlp-http.md

What currently works:
* The receiver will correctly process HTTP requests with the
  Content-Type application/x-protobuf.
* The receiver will respond with Content-Type application/x-protobuf.
* The receiver will respond with status code HTTP 200 OK on success.
What doesn't work yet:
* The receiver cannot handle gzip-encoded requests (Content-Encoding
  gzip).
* The receiver will not gzip-encode responses to requests with
  Accept-Encoding: gzip.


Updates open-telemetry#881
kirbyquerby added a commit to kirbyquerby/opentelemetry-collector that referenced this issue May 22, 2020
This change adds application/x-protobuf support to the existing
grpc-gateway mux in the OTLP receiver.

See: https://github.com/open-telemetry/oteps/blob/master/text/0099-otlp-http.md

What currently works:
* The receiver will correctly process HTTP requests with the
  Content-Type application/x-protobuf.
* The receiver will respond with Content-Type application/x-protobuf.
* The receiver will respond with status code HTTP 200 OK on success.
What doesn't work yet:
* The receiver cannot handle gzip-encoded requests (Content-Encoding
  gzip).
* The receiver will not gzip-encode responses to requests with
  Accept-Encoding: gzip.


Updates open-telemetry#881
tigrannajaryan pushed a commit that referenced this issue May 26, 2020
This change adds application/x-protobuf support to the existing
grpc-gateway mux in the OTLP receiver.

See: https://github.com/open-telemetry/oteps/blob/master/text/0099-otlp-http.md

What currently works:
* The receiver will correctly process HTTP requests with the
  Content-Type application/x-protobuf.
* The receiver will respond with Content-Type application/x-protobuf.
* The receiver will respond with status code HTTP 200 OK on success.

What doesn't work yet:
* The receiver cannot handle gzip-encoded requests (Content-Encoding
  gzip).
* The receiver will not gzip-encode responses to requests with
  Accept-Encoding: gzip.

Updates #881
@tigrannajaryan
Copy link
Member Author

Resolved by #1021

wyTrivail pushed a commit to mxiamxia/opentelemetry-collector that referenced this issue Jul 13, 2020
This change adds application/x-protobuf support to the existing
grpc-gateway mux in the OTLP receiver.

See: https://github.com/open-telemetry/oteps/blob/master/text/0099-otlp-http.md

What currently works:
* The receiver will correctly process HTTP requests with the
  Content-Type application/x-protobuf.
* The receiver will respond with Content-Type application/x-protobuf.
* The receiver will respond with status code HTTP 200 OK on success.

What doesn't work yet:
* The receiver cannot handle gzip-encoded requests (Content-Encoding
  gzip).
* The receiver will not gzip-encode responses to requests with
  Accept-Encoding: gzip.

Updates open-telemetry#881
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
* Update B3 header names

Correct the B3 single header name from `X-B3` to `b3`.

Use the lowercase version of the B3 multiple headers. This is based on
the fact that HTTP headers are case-insensitive, however, other
protocols may not be.

* Update Changelog
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
* Update changelog for v0.37.1 release

* Update CHANGELOG.md

Co-authored-by: Ryan Fitzpatrick <rmfitzpatrick@users.noreply.github.com>

Co-authored-by: Ryan Fitzpatrick <rmfitzpatrick@users.noreply.github.com>
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

No branches or pull requests

3 participants