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

[Feature request] tracing in SQL requests #50646

Open
mingmxu opened this issue Sep 3, 2024 · 1 comment
Open

[Feature request] tracing in SQL requests #50646

mingmxu opened this issue Sep 3, 2024 · 1 comment

Comments

@mingmxu
Copy link
Contributor

mingmxu commented Sep 3, 2024

Feature request

Is your feature request related to a problem? Please describe.
It's hard to dig into the details while troubleshooting a query. In our use case, queries from clients are sent to Starrocks using the JDBC protocol, and Datadog is the observability platform for log/metric collection, etc.

It lacks some core features when looking into the details of the query processing:

  • there's no trace for SQL queries to show the processing steps, communication between FE/BE, etc;
  • not able to find all the log events based on query_id;

Describe the solution you'd like
With OpenTelemetry, we build a platform-independent trace record for each SQL request to expose the processing information, including spans and log events, within/between FE and BE components. It includes several improvements:

  • build trace record for each SQL request;
  • support trace context propagation from client;
  • support trace context from FE to BE;
  • attach trace context to log events;

Describe alternatives you've considered

Additional context
We run a PoC(proof-of-concept) to achieve some of the requirements, the solution is implemented as below:

  • trace context is added as a comment to the SQL;
  • In FE, it starts a trace record for each query, with the parentContext extracted from SQL comments when provided;
  • trace context is added to log events as tags with MDC, BE is not covered in the PoC;
@mingmxu
Copy link
Contributor Author

mingmxu commented Sep 3, 2024

cc @dengliu @chaoyli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant