Skip to content

chore: updated mapping#2615

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

chore: updated mapping#2615
abhilash-sivan wants to merge 194 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
[INSTRUMENTATION_TYPES.KAFKA]: {
spanName: data => `${data.operation} ${data.endpoints}`,
// In KafkaNode, we collect service directly
spanName: data => `${data.operation || data.access} ${data.service || data.endpoints}`,

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 don't think this change is correct. Kafka doesn't have an access field in the internal format, we already normalize it to operation, same for service and endpoint.

Suggested change
spanName: data => `${data.operation || data.access} ${data.service || data.endpoints}`,
spanName: data => `${data.operation} ${data.endpoints}`,

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 KafkaNode, we collect access and service directly.
see:

Seems like this is a valid case 🤔

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 think this is something we ignored earlier. I think we need a refactoring PR for kafka node to use internal format.

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.

its not a good idea to handle internal and be formats

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.

{ otlp: OTLP.messaging.SYSTEM, value: 'kafka' },
{ otlp: OTLP.messaging.DESTINATION_NAME, instana: 'endpoints' },
{ otlp: OTLP.messaging.OPERATION_NAME, instana: 'operation' },
{ otlp: OTLP.messaging.DESTINATION_NAME, instana: ['service', 'endpoints'], transform: firstDefined },

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.

here too

transform: values => {
const op = firstDefined(values);
if (op === 'send') return 'send';
if (op === 'consume') return 'receive';

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.

Why are we updating the value? IMO, we shouldn't modify it, we should send it as-is. These are package-specific operation names, and they can differ across packages or even between language implementations.

TBD

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.

Yeah, we already discussed this. I took the mapping from RFD, but as you said, modifying the value doesn't seem correct. I will revert this change

return op || null;
}
},
{ otlp: OTLP.messaging.BATCH_MESSAGE_COUNT, spanLevel: 'b.s' },

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 don't think this logic is correct. b.s represents the span batch size and shouldn't be coupled with the messaging batch size.

// bull.sort 'exit' → 'send', 'entry' → 'process'
otlp: OTLP.messaging.OPERATION_NAME,
instana: 'sort',
transform: sort => BULL_SORT_OP[String(sort)] || sort

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.

Here too

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.

Agree

{ otlp: OTLP.messaging.DESTINATION_NAME, instana: 'queue' },
{ otlp: OTLP.messaging.MESSAGE_BODY_SIZE, instana: 'size' },
// 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.

This too

@aryamohanan aryamohanan force-pushed the chore-otel-span-mapper branch from 89a73c7 to dfaf341 Compare June 26, 2026 12:15
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.

3 participants