[Playground] OTLP-Mapper - instana to otlp span mapper#2534
[Playground] OTLP-Mapper - instana to otlp span mapper#2534abhilash-sivan wants to merge 103 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. |
08a2757 to
e827e9c
Compare
e827e9c to
d6c01a6
Compare
| @@ -0,0 +1,170 @@ | |||
| # OTLP (OpenTelemetry Protocol) Converter | |||
There was a problem hiding this comment.
qs: Why is the OTLP module not part of the tracing folder?
There was a problem hiding this comment.
This module handles all telemetry signals- Traces, Metrics, and Logs. Placing it under the tracing folder would unnecessarily couple it to tracing-specific concepts such as spans. Keeping it at the root allows the logic to remain shared and signal-agnostic. It also provides flexibility for future enhancements, such as extending the OTLP implementation to emit additional telemetry signals like logs.
There was a problem hiding this comment.
IMO it belongs to core/tracing/exporters
There was a problem hiding this comment.
We can discuss this before merging. No big topic
| }; | ||
|
|
||
| const originFrom = rawSpan.data?.resource || null; | ||
| const rKey = resourceFactory.getResourceKey(originFrom); |
There was a problem hiding this comment.
const originFrom = rawSpan.data?.resource || null; const rKey = resourceFactory.getResourceKey(originFrom);
This looks wrong to me? 🤔
This must be rawSpan.f?
There was a problem hiding this comment.
Any instana span has .f - doesn't matter if its coming from ours instrumentations or from otel integration.
|
|
||
| // 1.23 matches baseline parameters identically. No overrides required. | ||
|
|
||
| const LOOKUP_OVERRIDES = {}; |
There was a problem hiding this comment.
// base loopup based on v1.23 with some common mappings as well
Okay I understood the current sem conv structure. So yeah the base mappings are secretly from v1.23.
I'd like to suggest this:
index.js
const VERSIONS = {
'1.23': require('./v1.23'), // explicit version
'1.42': require('./v1.42') // explicit version
};Three folders
- base/
- mappings.js
- v1.23/
- index.js
- mappings.js
- v1.43/
- index.js
- mappings.js
- merge.js
base/mappings.js
module.exports = require('../v1.23/mappings');v1.23/mappings.js
const MAPPINGS = {
metadata: {
TRACE_ID: 'traceId',
...v1.23/index.js
const { merge } = require('../merge');
const base = require('../base/mappings').MAPPINGS;
const { MAPPINGS } = require('./mappings');
module.exports = merge(base, MAPPINGS);
v1.41/index.js
const { merge } = require('../merge');
const base = require('../base/mappings').MAPPINGS;
const { MAPPINGS } = require('./mappings');
module.exports = merge(base, MAPPINGS);
v1.41/mappings.js
const MAPPINGS = {
http: {
REQUEST_METHOD: 'http.request.method',
RESPONSE_STATUS: 'http.response.status_code',
...The concept of overrides === merge.
| for (let i = 0; i < mapping.instana.length; i++) { | ||
| values.push(spanData?.[mapping.instana[i]]); | ||
| } | ||
| value = mapping.transform ? mapping.transform(spanData, values) : combineFields(values); |
There was a problem hiding this comment.
Is that right?
combineFields(values)
combineFields takes 2 arguments.
Summary
Introduces the Instana-to-OTLP Converter Playground.
4318/v1/traces).Out of Scope
TODO
Core Implementation
span.data.peer,span.data.mongo)INSTANA_OTLP_ENABLED?) - NOT PART OF THISSpan Data Mapping
Testing
Unit Tests
End-to-End Testing (@abhilash-sivan)
Performance Testing
Special Cases
Issue Tracking
Validation Checklist
Before merging, verify the following:
4318/v1/traces).Future Enhancements/TODO
/v1/logsendpoint.References