chore: added experimental OTLP trace exporter support#2534
chore: added experimental OTLP trace exporter support#2534abhilash-sivan wants to merge 181 commits into
Conversation
4490ab0 to
f1c0d6f
Compare
53e1fcc to
d261bc5
Compare
This needs to be communicated in the next WG. Traces & Metrics mapping is required. |
e827e9c to
d6c01a6
Compare
74c5459 to
b5a51c8
Compare
| * RabbitMQ-specific mappings | ||
| * Extends base messaging with RabbitMQ-specific fields | ||
| */ | ||
| rabbitmq: { |
There was a problem hiding this comment.
Not verified rabbitmq per se. It's just to show how we differentiate children under messaging or any other group.
There was a problem hiding this comment.
But for RabbitMQ, there’s nothing really common with BASE_MAPPINGS.messaging. I don’t think any of the others share much with it either, apart from Kafka.
| mappings: SPAN_ATTRIBUTE_MAPPINGS.kafka, | ||
| prefix: 'messaging.kafka', | ||
| additionalAttributes: { | ||
| 'messaging.system': 'kafka' |
There was a problem hiding this comment.
Why do we need that here? If we have already a custom kafka mapping object?
There was a problem hiding this comment.
messaging.system is an additional attribute that we append to the span. For Kafka, the system name also happens to be kafka, so it may seem redundant at first glance.
However, additionalAttributes is intended for constant or computed attributes that do not directly map from a single field inside span.data.kafka.
messaging.system falls into that category since it is effectively a constant defined per transformer, rather than something extracted from the incoming span payload itself.
I have changed this to: 'messaging.system': this.systemName
which will fetch the appropriate value in this case
97f77cd to
ce82272
Compare
| data, | ||
| cb: (err, body) => { | ||
| if (err) { | ||
| if (isOtlpExporterEnabled) { |
| batchingBuckets.clear(); | ||
| return spansToSend; | ||
| // AWS lambda uses this method to send spans downstream. | ||
| return transformSpansForExport(spansToSend); |
There was a problem hiding this comment.
found a bug introduced by the dual transformation refactoring. When the transformation was moved from addSpan() to transmitSpans(), the normal Collector → Agent flow continued to work, but the serverless/AWS Lambda path use getAndResetSpans() over transmitSpans().As a result, it now receives internal spans instead of transformed backend spans.
Added the transformation here too. Only lambda call this function to get the spans
There was a problem hiding this comment.
IMO it's better to extract this refactor, created a PR #2620
Summary
Introduces the Instana-to-OTLP exporter.
4318/v1/traces) with agent.Out of Scope
TODO
Core Implementation
span.data.peer,span.data.mongo)Span Attribute Mapping @abhilash-sivan
Testing
Unit Tests
End-to-End Testing (@abhilash-sivan)
Performance Testing
Issue Tracking
Validation Checklist
Before merging, verify the following:
4318/v1/traces).Future Enhancements/TODO
/v1/logsendpoint.References