chore: added experimental OTLP trace exporter support#2534
chore: added experimental OTLP trace exporter support#2534abhilash-sivan wants to merge 136 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
| @@ -0,0 +1,106 @@ | |||
| /* | |||
| * (c) Copyright IBM Corp. 2026 | |||
There was a problem hiding this comment.
Do we need this app still?
Wondering if we can just have a separate npm script in the example-apps/collector app?
With config otlp being on.
There was a problem hiding this comment.
We can remove this after finishing the playground work, since the example app also includes Kafka and database tests that are only required for playground testing.
3c96ae7 to
e4f95a4
Compare
| * @returns | ||
| */ | ||
| exports.activate = function activate(_metrics, _downstreamConnection, _onSuccess, _onError) { | ||
| exports.activate = function activate(_metrics, _downstreamConnection, _onSuccess, _onError, _config) { |
There was a problem hiding this comment.
transmissionCycle has its own config reference. Why do we provide the extra config object here?
There was a problem hiding this comment.
I passed _config because the configuration is evaluated after the agent response is received. Using the config passed at activation time ensures we use the configuration that was resolved according to the precedence rules.
Co-authored-by: kirrg001 <katharina.irrgang@ibm.com>
| * @param {{ agentPort: number }} defaultConfig | ||
| * @returns {number} | ||
| */ | ||
| function normalizeAgentDataPort(userConfig, defaultConfig) { |
There was a problem hiding this comment.
I removed this logic because the separation between data port and agent connection port does not work well for the current OTLP implementation.
sendData() is used for multiple endpoint types. Some requests need to be sent to OTLP endpoints, while others still need to go to regular agent endpoints (eg: /tracemetrics). Switching the port based on OTLP state at a higher level can cause non-OTLP requests to be sent to the wrong port.
In addition, this code executes before the final configuration has been resolved. At this stage, we do not yet know the effective value of otlp.enabled, so making port-selection decisions here can be incorrect.
For these reasons, I removed the logic and kept endpoint/port selection closer to the actual export path, where both the resolved configuration and the target endpoint are known.
Summary
Introduces the Instana-to-OTLP exporter.
4318/v1/traces).Out of Scope
TODO
Core Implementation
span.data.peer,span.data.mongo)INSTANA_OTLP_ENABLED?) - NOT PART OF THISSpan Data 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