Skip to content

Conversation

@dpetran
Copy link
Contributor

@dpetran dpetran commented Jan 14, 2026

This PR adds a OpenTelemetry-compatible tracing facade and instruments the Fluree runtime. This allows us to correlate db work across services and make flamegraphs to help identify performance bottlenecks.

An example of a trace displayed in Jaeger:
Jaeger_create

An example of a span in Jaeger:
Jaeger_trace-detail

@dpetran dpetran force-pushed the feature/otel-tracing branch 3 times, most recently from 8605f6d to fa11a9a Compare January 15, 2026 22:31
@dpetran dpetran requested a review from a team January 15, 2026 23:11
We only want to include a logging facade in our classpath so that the
calling application can supply their own logging implementation. Also
add the Open Telemetry tracing facade.
clj-kondo does not execute code, so macros are never expanded, so the
dependencies in fluree.db.util.trace don't look like they used. This
suppresses the false positive warnings.
Eastwood warns that the `trace/form` macro expands to a suspicious
expression:

"suspicious-expression: with-open called with 1 args. (with-open
bindings) always returns nil. Perhaps there are misplaced parentheses?"

The `trace/form` invocations are the only places where the warning
occurs, and in this case represent a valid usage of with-open.
@dpetran dpetran force-pushed the feature/otel-tracing branch from fa11a9a to 36656d8 Compare January 16, 2026 20:25
@dpetran dpetran changed the base branch from main to fix/remote-ledger-not-found January 16, 2026 20:33
Copy link
Contributor

@zonotope zonotope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⌨️


indexed-db))))
db)))
(trace/async-form ::refresh {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to include the alias and t for the refreshed db in the attributes?

Base automatically changed from fix/remote-ledger-not-found to main January 16, 2026 22:09
@dpetran dpetran merged commit 2843030 into main Jan 16, 2026
10 checks passed
@dpetran dpetran deleted the feature/otel-tracing branch January 16, 2026 22:23
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

Successfully merging this pull request may close these issues.

3 participants