You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to connect the consumer to a parent using the io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:1.23.0-alpha like this and span.setParent.
However, X-Ray will see these as sub-segments, instead of remotes.
Is this correct?
Is producer-consumer only intended to be internally in an application, not for applications communicating events via SQS?
Steps to Reproduce
Use otel-collector with xray
Use ECS application with SQS. SQS raw message delivery. Attributes ask for AWSTraceHeader.
Create spans after SQS receiveMessage:
tracer.spanBuilder("myEvent receive")
.apply { createSpanFromSqs(message)?.let { this.setParent(it) } }
.setSpanKind(SpanKind.CONSUMER)
// Then startSpan, makeCurrent, end etc.
where I get a parent like this:
fun createSpanFromSqs(message: Message): Context? {
val xrayTracingId = message.attributes().get(MessageSystemAttributeName.AWS_TRACE_HEADER)
if (xrayTracingId == null) {
return null
}
val context: Context =
AwsXrayPropagator.getInstance()
.extract(Context.root(), mapOf("X-Amzn-Trace-Id" to xrayTracingId), getter)
return context
}
Expected Result
Segments in xray called myEvent receive.
Actual Result
Subsegment nested under some other service, making it look internal.
Collector version
0.26.1
Environment information
Environment
"otel.resource.cloud.platform": "aws_ecs",
"otel.resource.os.type": "linux",
"otel.resource.aws.ecs.launchtype": "fargate",
"otel.resource.host.arch": "amd64",
"otel.resource.telemetry.auto.version": "1.23.0-aws",
"otel.resource.os.description": "Linux 5.10.167-147.601.amzn2.x86_64",
"otel.resource.process.runtime.description": "Azul Systems, Inc. OpenJDK 64-Bit Server VM 19.0.2+7",
"otel.resource.process.runtime.version": "19.0.2+7",
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Component(s)
exporter/awsxray
What happened?
Description
The current AWS X-Ray exporter will create subsegments of all spans but Server.
For an application using messaging, like an AWS SQS consumer, it seems correct to use SpanKind Consumer https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#spankind .
I try to connect the consumer to a parent using the
io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:1.23.0-alpha
like this andspan.setParent
.However, X-Ray will see these as sub-segments, instead of remotes.
Is this correct?
Is producer-consumer only intended to be internally in an application, not for applications communicating events via SQS?
Steps to Reproduce
AWSTraceHeader
.where I get a parent like this:
Expected Result
Segments in xray called
myEvent receive
.Actual Result
Subsegment nested under some other service, making it look internal.
Collector version
0.26.1
Environment information
Environment
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: