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: Support OpenTelemetry #230

Closed
sc07kvm opened this issue Jun 30, 2021 · 3 comments
Closed

Feature request: Support OpenTelemetry #230

sc07kvm opened this issue Jun 30, 2021 · 3 comments

Comments

@sc07kvm
Copy link

sc07kvm commented Jun 30, 2021

Since ClickHouse supports OpenTelemetry it would be cool to be able to transfer trace context in request similar to options
--opentelemetry-traceparent and --opentelemetry-tracestate in clickhouse-client

@xzkostyan
Copy link
Member

Please explain a little bit more how do you see OpenTelemetry implementatioin in this package.

@sc07kvm
Copy link
Author

sc07kvm commented Aug 3, 2021

I see OpenTelemetry implementatioin as options in settings of the clickhouse_driver.Client and clickhouse_driver.Client.execute[_iter|_with_progress]. These options will be passed to the server. Example:

>>> settings = {
    'opentelemetry_traceparent': '00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01', 
    'opentelemetry_tracestate': 'congo=t61rcWkgMzE'}
>>> client = Client('localhost', settings=settings)

Description of --opentelemetry-traceparent and --opentelemetry-tracestate can be found here:

clickhouse-client --help
...
  --opentelemetry-traceparent arg   OpenTelemetry traceparent header as described by W3C Trace Context recommendation
  --opentelemetry-tracestate arg    OpenTelemetry tracestate header as described by W3C Trace Context recommendation
...

xzkostyan added a commit that referenced this issue Aug 6, 2021
@xzkostyan
Copy link
Member

@sc07kvm I've added OpenTelemetry support to latest master. Looking forward to your feedback.

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

No branches or pull requests

2 participants