Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traces are not propagated from kafka connect to mongoDB #12261

Open
jiten686 opened this issue Sep 16, 2024 · 4 comments
Open

Traces are not propagated from kafka connect to mongoDB #12261

jiten686 opened this issue Sep 16, 2024 · 4 comments
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome new instrumentation

Comments

@jiten686
Copy link

jiten686 commented Sep 16, 2024

Describe the bug

I am using Mongo kafka sink connector to send the data from kafka topic to MongoDB. I have set following environment variables on server where my connector is running. I am using Opentelemetry JavaAgent 2.6.0.

export JAVA_TOOL_OPTIONS=-javaagent:/otel_java_agent/opentelemetry-javaagent.jar
export OTEL_TRACES_EXPORTER=otlp
export OTEL_METRICS_EXPORTER=none
export OTEL_LOGS_EXPORTER=none
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_PROPAGATORS=tracecontext,baggage
export OTEL_EXPORTER_OTLP_ENDPOINT=http://...**

But I am not able to see the traces from kafka-connector to Mongo DB.

Steps to reproduce

Set the environment variable as per Description.
Run the Mongo kafka sink connect on server.

Expected behavior

Traces should be propagate in a single trace to the database.

Actual behavior

Traces are not propagated in a single trace to the database.

Javaagent or library instrumentation version

Opentelemetry JavaAgent 2.6.0

Environment

JDK:
OS:

Additional context

No response

@jiten686 jiten686 added bug Something isn't working needs triage New issue that requires triage labels Sep 16, 2024
@laurit
Copy link
Contributor

laurit commented Sep 17, 2024

This is probably going to require instrumentation for Debezium. We'd welcome a contribution for this. Alternatively you may work with Debezium community and have opentelemetry support added there.

@laurit laurit added contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome new instrumentation and removed bug Something isn't working needs triage New issue that requires triage labels Sep 17, 2024
@Cirilla-zmh
Copy link

Hi @jiten686 , I've encountered a similar issue to what you've described. After exploring the Debezium kafka connector, I've concluded that achieving an elegant solution solely through coding in opentelemetry-java-instrumentation is challenging. This is primarily due to the difficulty of defining a standard "trace context carrier" within Debezium's framework while coding an instrumentation.

If you're looking for solutions regarding distributed tracing in Debezium, you might find this document helpful.
https://debezium.io/documentation/reference/stable/integrations/tracing.html

@jiten686
Copy link
Author

I am using Mongo sink connector.

@Cirilla-zmh
Copy link

I am using Mongo sink connector.

Sorry for my wrong comment. I noticed that you are using the Kafka Connector provided by the MongoDB community and have already raised an issue related to it on the MongoDB community.
https://www.mongodb.com/community/forums/t/mongodb-kafka-sink-connector-not-propagate-traces-to-the-mongodb-database/297786
I believe this will be a more effective way to resolve the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome new instrumentation
Projects
None yet
Development

No branches or pull requests

3 participants