-
Notifications
You must be signed in to change notification settings - Fork 694
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
Proof of concept for OTel tracing #1676
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Trace you showed me looks about right. Clustered systems running on local host do about 10-100 INSERTs per second (because the disks saturate for all the nodes). rqlite won't win any prizes for speed.
@@ -24,6 +24,7 @@ message Request { | |||
bool transaction = 1; | |||
repeated Statement statements = 2; | |||
int64 dbTimeout = 3; | |||
map<string, string> metadata = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why do this? I am wondering if I had use context objects properly and throughout rqlite (I started coding rqlite long before contexts were introduced) would this be necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it would still be necessary.
Context objects propagate trace context within a process; this mechanism is analogous to HTTP headers such as the W3C trace-parent header, and is used to propagate context across process boundaries.
@@ -206,6 +206,9 @@ type Config struct { | |||
|
|||
// MemProfile enables memory profiling. | |||
MemProfile string | |||
|
|||
// OTLPDest sets the OTLP endpoint | |||
OTLPDest string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so we're clear, what did you set this to at launch time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ cat << EOF > config.yml
receivers:
otlp:
protocols:
grpc:
exporters:
googlecloud:
project: some-project-name
service:
pipelines:
traces:
receivers: [otlp]
exporters: [googlecloud]
EOF
$ otelcol-contrib \
--config ./config.yml &
$ OTEL_SERVICE_NAME=rqlited.1 go run ./cmd/rqlited \
--otlp-dest localhost:4317 \
~/node1 &
$ OTEL_SERVICE_NAME=rqlited.2 go run ./cmd/rqlited \
--http-addr localhost:14001 \
--raft-addr localhost:14002 \
--otlp-dest localhost:4317 \
--join localhost:4002 \
~/node2 &
$ OTEL_SERVICE_NAME=rqlite go run ./cmd/rqlite \
--otlp-dest localhost:4317
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should mention that this command-line argument is short and explicit, but doesn't expose the full feature set of the OTLP exporter. Before this PR is merged, I'd want to switch over to the autoexport package which is configured using these environment variables.
This only covers non-queued execute requests. If the direction makes sense, we could
Fixes #727.