chore: updated mapping#2615
Conversation
9b234ee to
7706438
Compare
97f77cd to
ce82272
Compare
e4c0b88 to
468fecb
Compare
89a73c7 to
dfaf341
Compare
4fc866a to
3eee538
Compare
| @@ -18,9 +18,6 @@ const MAPPINGS = { | |||
| DESTINATION_NAME: 'messaging.destination', | |||
| kafka: { | |||
| PARTITION: 'messaging.kafka.partition' | |||
There was a problem hiding this comment.
I miss messaging.operation in v1.23 and messaging.operation.name in v1.41
| @@ -93,6 +103,7 @@ const instrumentationMappings = { | |||
| { otlp: OTLP.messaging.DESTINATION_NAME, instana: ['exchange', 'key', 'queue'] }, | |||
There was a problem hiding this comment.
qs: Are we collecting rabbitmq.queue from our instrumentation?
There was a problem hiding this comment.
No, we are not. The purpose of adding some of these fields is that I thought even if we do not collect the data now, we can add this later because some of this was marked as mandatory in the RFD, so even if we keep this mapping here right now, the functionality won't be affected because we will clean up the undefined data.
from rfd:
| rabbitmq.exchange + rabbitmq.key + rabbitmq.queue | messaging.destination.name |
|---|
That said, with the more recent changes in mapping, we went with stricter checking of what our instrumentation produces and retained only the relevant mappings. Given that, this can be removed. Thanks!
There was a problem hiding this comment.
The purpose of adding some of these fields is that I thought even if we do not collect the data now, we can add this later because some of this was marked as mandatory in the RFD,
Please don't rely solely on the RFD. As you know, it isn't thoroughly reviewed or guaranteed to match every tracer, at least for us. It's better to validate the requirements against our instrumentation rather than assuming everything in the RFD is accurate.
| @@ -93,6 +103,7 @@ const instrumentationMappings = { | |||
| { otlp: OTLP.messaging.DESTINATION_NAME, instana: ['exchange', 'key', 'queue'] }, | |||
| { otlp: OTLP.messaging.rabbitmq.ROUTING_KEY, instana: 'exchange' }, | |||
| { otlp: OTLP.messaging.rabbitmq.MESSAGE_ROUTING_KEY, instana: 'key' }, | |||
There was a problem hiding this comment.
Where did you get this mapping key messaging.rabbitmq.message.routing_key
There was a problem hiding this comment.
This is a manual error; the actual key is messaging.rabbitmq.destination.routing_key
Co-authored-by: Arya <arya.mohanan@ibm.com>
| spanAttributes: [ | ||
| { otlp: OTLP.messaging.SYSTEM, value: OTLP.messaging.sqs?.SYSTEM || 'aws.sqs' }, | ||
| { otlp: OTLP.messaging.SYSTEM, value: 'aws_sqs' }, | ||
| { otlp: OTLP.messaging.OPERATION_NAME, instana: 'type' }, |
There was a problem hiding this comment.
Note: Type seems mandatory field but we only collect that in exit spans? I checked v3/sqs instrumentation. Please research and confirm.
The values we collected are "single.sync" or "batch.sync".
There was a problem hiding this comment.
In v2, also, we collect type
return cls.ns.runAndReturn(() => {
const span = cls.startSpan({
spanName: 'sqs',
kind: EXIT
});
span.ts = Date.now();
span.stack = tracingUtil.getStackTrace(instrumentedSendMessage);
span.data.sqs = {
sort: sortTypes.EXIT,
type: messageData.Entries ? callTypes.SEND_MESSAGE_BATCH : callTypes.SEND_MESSAGE,
group: messageData.MessageGroupId,
queue: originalArgs[0].QueueUrl || ''
};
here also we only collect "type" for exit spans.
But I don't think that impacts this mapping. We map everything here—if the field is present, we convert it; otherwise, we clean it up. Also, there is no type field in the resulting OpenTelemetry span. correct ?
There was a problem hiding this comment.
I'm bit confused: now https://opentelemetry.io/docs/specs/semconv/faas/aws-lambda/#sqs-message
- faas.trigger MUST be set to pubsub.
- messaging.operation.type MUST be set to process.
- messaging.system MUST be set to aws_sqs.
| { otlp: OTLP.messaging.DESTINATION_NAME, instana: 'queue' }, | ||
| { otlp: OTLP.messaging.MESSAGE_BODY_SIZE, instana: 'size' }, | ||
| // TBD sqs.size = number of messages in a batch send (SendMessageBatch), not body bytes | ||
| { otlp: OTLP.messaging.BATCH_MESSAGE_COUNT, instana: 'size' }, |
There was a problem hiding this comment.
I agree, may be we can remove the comment
| @@ -93,6 +103,7 @@ const instrumentationMappings = { | |||
| { otlp: OTLP.messaging.DESTINATION_NAME, instana: ['exchange', 'key', 'queue'] }, | |||
There was a problem hiding this comment.
The purpose of adding some of these fields is that I thought even if we do not collect the data now, we can add this later because some of this was marked as mandatory in the RFD,
Please don't rely solely on the RFD. As you know, it isn't thoroughly reviewed or guaranteed to match every tracer, at least for us. It's better to validate the requirements against our instrumentation rather than assuming everything in the RFD is accurate.
| spanAttributes: [ | ||
| { otlp: OTLP.messaging.SYSTEM, value: OTLP.messaging.sqs?.SYSTEM || 'aws.sqs' }, | ||
| { otlp: OTLP.messaging.SYSTEM, value: 'aws_sqs' }, | ||
| { otlp: OTLP.messaging.OPERATION_NAME, instana: 'type' }, |
There was a problem hiding this comment.
I'm bit confused: now https://opentelemetry.io/docs/specs/semconv/faas/aws-lambda/#sqs-message
- faas.trigger MUST be set to pubsub.
- messaging.operation.type MUST be set to process.
- messaging.system MUST be set to aws_sqs.
| spanAttributes: [ | ||
| { otlp: OTLP.database.SYSTEM, value: 'memcached' }, | ||
| { otlp: OTLP.database.CONNECTION, instana: 'connection' }, | ||
| { otlp: OTLP.database.OPERATION, instana: 'operation' }, |
There was a problem hiding this comment.
server address and port is missing, we can get the value from connection
| { otlp: OTLP.database.COLLECTION, instana: 'model' }, | ||
| { otlp: OTLP.database.OPERATION, instana: 'action' }, | ||
| { otlp: OTLP.database.CONNECTION, instana: 'url' }, | ||
| { otlp: OTLP.error.TYPE, instana: 'error' } |
There was a problem hiding this comment.
We can also find server address and port from url
| @@ -296,23 +308,60 @@ | |||
| [INSTRUMENTATION_TYPES.RPC]: { | |||
| spanName: data => data.call || 'rpc.call', | |||
| { | ||
| otlp: OTLP.rpc.METHOD, | ||
| instana: 'call', | ||
| transform: (value, spanData) => { |
There was a problem hiding this comment.
complex logic move to util.js
Co-authored-by: Arya <arya.mohanan@ibm.com>
grpc
aws s3
azure storage
aws lambda
aws lambda invoke
revisitted messaging libs for gap filling