Skip to content

chore: updated mapping#2615

Open
abhilash-sivan wants to merge 6 commits into
chore-otel-span-mapperfrom
chore-update-mapping
Open

chore: updated mapping#2615
abhilash-sivan wants to merge 6 commits into
chore-otel-span-mapperfrom
chore-update-mapping

Conversation

@abhilash-sivan

@abhilash-sivan abhilash-sivan commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

grpc
aws s3
azure storage
aws lambda
aws lambda invoke

revisitted messaging libs for gap filling

@abhilash-sivan abhilash-sivan force-pushed the chore-update-mapping branch 2 times, most recently from 9b234ee to 7706438 Compare June 25, 2026 05:00
@abhilash-sivan abhilash-sivan changed the title Chore update mapping chore: update mapping for cloud services Jun 25, 2026
@abhilash-sivan abhilash-sivan marked this pull request as ready for review June 25, 2026 05:41
@abhilash-sivan abhilash-sivan requested a review from a team as a code owner June 25, 2026 05:41
@aryamohanan aryamohanan force-pushed the chore-otel-span-mapper branch from 97f77cd to ce82272 Compare June 25, 2026 13:04
@abhilash-sivan abhilash-sivan changed the title chore: update mapping for cloud services chore: updated mapping Jun 26, 2026
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
@aryamohanan aryamohanan force-pushed the chore-otel-span-mapper branch from 89a73c7 to dfaf341 Compare June 26, 2026 12:15
Comment thread packages/core/src/otlpExporter/traces/mappers/constants.js
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
@@ -18,9 +18,6 @@ const MAPPINGS = {
DESTINATION_NAME: 'messaging.destination',
kafka: {
PARTITION: 'messaging.kafka.partition'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I miss messaging.operation in v1.23 and messaging.operation.name in v1.41

Comment thread packages/core/src/otlpExporter/common/semconv/base/mappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
@@ -93,6 +103,7 @@ const instrumentationMappings = {
{ otlp: OTLP.messaging.DESTINATION_NAME, instana: ['exchange', 'key', 'queue'] },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qs: Are we collecting rabbitmq.queue from our instrumentation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
@@ -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' },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get this mapping key messaging.rabbitmq.message.routing_key

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a manual error; the actual key is messaging.rabbitmq.destination.routing_key

Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Co-authored-by: Arya <arya.mohanan@ibm.com>
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
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' },

@aryamohanan aryamohanan Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm bit confused: now https://opentelemetry.io/docs/specs/semconv/faas/aws-lambda/#sqs-message

Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
{ 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' },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, may be we can remove the comment

@@ -93,6 +103,7 @@ const instrumentationMappings = {
{ otlp: OTLP.messaging.DESTINATION_NAME, instana: ['exchange', 'key', 'queue'] },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm bit confused: now https://opentelemetry.io/docs/specs/semconv/faas/aws-lambda/#sqs-message

Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
spanAttributes: [
{ otlp: OTLP.database.SYSTEM, value: 'memcached' },
{ otlp: OTLP.database.CONNECTION, instana: 'connection' },
{ otlp: OTLP.database.OPERATION, instana: 'operation' },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also find server address and port from url

Comment thread packages/core/src/otlpExporter/traces/mappers/instanaInstrumentationMappings.js Outdated
@@ -296,23 +308,60 @@
[INSTRUMENTATION_TYPES.RPC]: {
spanName: data => data.call || 'rpc.call',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'rpc.call'?

{
otlp: OTLP.rpc.METHOD,
instana: 'call',
transform: (value, spanData) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

complex logic move to util.js

Co-authored-by: Arya <arya.mohanan@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants