-
Notifications
You must be signed in to change notification settings - Fork 705
[WIP] OTLP Exporter support for http/protobuf #1615
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
[WIP] OTLP Exporter support for http/protobuf #1615
Conversation
Does this conflict with #1604 ? |
HeadersInput = Union[Dict[str, str], str, None] | ||
Headers = Dict[str, str] | ||
|
||
|
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.
nit: Do any of the following really belong in utils? May be constants.py
or symbols.py
would be better if not types
from typing import Dict, Union | ||
|
||
HeadersInput = Union[Dict[str, str], str, None] | ||
Headers = Dict[str, str] |
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.
nit: these should be defined either in the module that is consuming them or in a exporter.otlp.types
.
@robwknox |
@lzchen apologies for not dropping a note earlier but I don't have time to continue working on this due to a personal issue that has come up. |
@robwknox Closing for now. |
Thanks for your help @robwknox! |
Description
Adds support for the http/protobuf protocol. Code structure has been refactored to introduce the notions of
Encoders
(e.g. Protobuf) andSenders
(e.g. GRPC, HTTP) akin to the recent refactoring of the Zipkin Exporter. This was done to decouple the functionality to allow for the introduction of additional implementations of each and, as importantly, for easier and cleaner testing. The structure is also well suited for handling the re-introduction of metric signals when the code becomes stable (I initially had the metric code refactored and included ;) but pulled it out when it was moved to experimental status).Breaking Changes
OTLPSpanExporter
:opentelemetry.exporter.otlp.exporter
=>opentelemetry.exporter.otlp
__init__
signature argument changes:protocol
: new and requiredcompression
: type changed from string to enumheaders
: type changed from Sequence to Dict for more apt structure. Headers, whether passed in or retrieved from env vars, are now parsed into a common dict structure before being passed into the Senders.credentials
: changed tocertificate_file
(optional string). This aligns with the spec and is necessary since http/protobuf can not make use of aChannelCredentials
object - which is what the type was for credentials.Fixes #1106
Type of change
How Has This Been Tested?
Does This PR Require a Contrib Repo Change?
Checklist: