-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
A way to export internal data as OTLP proto format #1719
Comments
Solving partially this #1720 |
@bogdandrutu Thanks for your reply! After applying this PR we can map the internal data to Could we ask you to shed some lights on how should we use the generated OPTL protobuf structs? Does that make sense to either:
Also, will we apply a similar change for |
There are 2 things:
Probably this week I will give you the exporter, then will spend more time thinking about the protos, as I said is not just exposing is also making sure that we don't stop our progress to improve performance |
It may be easier to expose a ToProtoBytes method that serializes things for you as well as a ToJsonString without exposing the data structures that we use to encode/decode |
@chenzhihao any reason you do not want to use official OTLP/HTTP protocol? |
I can see one: It is not implemented yet :) |
For reference, OTLP/HTTP exporter is planned for GA: #882 and we could use some help to implement it. |
@bogdandrutu if we could have the helper method (If we could eventually have the exporter which can transport otlp over http that would be awesome!) |
The exporter is coming soon. The helper methods feel free to craft a PR, I need to see how it looks before making a decision (just the signatures is enough) |
@bogdandrutu I created a PR draft for the functions: #1741 Do you think this makes sense? If we can make a decision I will go on working on it. |
I think this may give us more flexibilities for consuming these Protobuf bytes comparing to using the coming OTLP/HTTP exporter directly. For instance, we are aiming to send these protobuf bytes via HTTP1.1 with some customized HTTP header metadata. This kind of specific requirement could be hard to be achieved by using the coming OTLP/HTTP exporter. |
…uf bytes (#1741) Add the public functions to export internal pipeline data to otlp `ExportLogsServiceRequest`, `ExportMetricsServiceRequest`, `ExportTraceServiceRequest`. The intention for this feature is to add a way to export the internal data to protbuf bytes without exposing the internal protobuf generated data structure. Thus the user can send this otlp data over HTTP. **Link to tracking Issue:** #1719 **Testing:** Unit test added.
Is your feature request related to a problem? Please describe.
We are trying to add a customised OPTL collector Exporter to send the metrics and spans via HTTP1.1 to our ingestion service by using OPTL protobuf binary as the transport data format.
But we can't simply convert the
pdata.Traces
andpdata.Metrics
to the OPTL Protobuf-based structs as these structs are in the private fields ofpdata
in the implementation of OPTL collector:Describe the solution you'd like
Create an HTTP equivalent of
opentelemetry-collector/exporter/otlpexporter
andopentelemetry-collector/exporter/otlpexporter
which export the spans and metrics via HTTP1.1 by using OPTL protobuf binary as the transport data format.Describe alternatives you've considered
Add public APIs in OPTL collector which can map the internal data to OPTL protobuf-based structs.
e.g. a public helper function as
func MetricDataToOtlp(m pdata.Metrics) *otlpmetrics.ResourceMetrics {}
Additional context
We considered to follow the implementation of opentelemtry-collector-contribute to map the
pdata
to OpenCensus Protobuf-based structs:https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/master/exporter/newrelicexporter/newrelic.go#L86
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/master/exporter/newrelicexporter/newrelic.go#L117
But we thought this is not an ideal long term solution as eventually OpenCensus could be retired.
The text was updated successfully, but these errors were encountered: