Skip to content

sqsProcessHook no longer available to augment spans per-message #3016

@sam-super

Description

@sam-super

What version of OpenTelemetry are you using?

"@opentelemetry/auto-instrumentations-node": "0.62.2",
"@opentelemetry/instrumentation-aws-sdk": "0.58.0",

What version of Node are you using?

22.18.0

What did you do?

const sdk = new NodeSDK({
  resource,
  traceExporter: traceExporter,
  spanProcessors: [new node.BatchSpanProcessor(traceExporter, {})],
  instrumentations: [
    getNodeAutoInstrumentations({
      '@opentelemetry/instrumentation-aws-sdk': {
        enabled: true,
        sqsExtractContextPropagationFromPayload: true,
        sqsProcessHook: sqsProcessHook,
      },
    }),
  ],
});

What did you expect to see?

in @opentelemetry/[email protected] sqsProcessHook could be defined, but now it's not an option. we were using it to add some extra data to the span based on the sqs message.

What did you see instead?

This has been removed on this PR moving to span links instead of processing spans:
#2345

Additional context

If there is a way to achieve the same using the new version that would be great, but i can't see an option. i tried responseHook but that only works on the response (not on the individual message), so we can't add attributes to the per-message span.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions