Skip to content

Write keygrabber samples to several named sinks, and add an OTLP sink for Prometheus - #51

Open
mikelangmayr wants to merge 2 commits into
mainfrom
keygrabber-sinks
Open

mikelangmayr wants to merge 2 commits into
mainfrom
keygrabber-sinks

Conversation

@mikelangmayr

@mikelangmayr mikelangmayr commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator
  • sink: becomes a named sinks: map; every sample goes to each sink from one read; the old key is refused with a pointer to the new shape
  • Each sink has its own writer thread, queue and retry backoff, so one that fails never holds up the reads or another sink
  • Status keywords per sink (<sink>.isconnected, pointswritten, writeerrors, queuedepth, droppedbatches); the unprefixed ones report the aggregate
  • New otlp sink: numeric and bool keywords as libby_keyword gauges stamped with their read time, exported to OTEL_EXPORTER_OTLP_ENDPOINT
  • Unknown keys in a sink's settings are refused
  • Keygrabber docs for both sink types

Comment thread libby/keygrabber/daemon.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since _track_sink_health is removed, I don't think anything calls this set method

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed, thanks.

f"{label} exports to OTEL_EXPORTER_OTLP_ENDPOINT, which is unset; "
"set it in otel.env")
timeout_s = None
if "timeout_s" in sink_config:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be good to also check for unknown sinks

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Unknown types were already refused; unknown keys in a sink are now too.

This branch has not been deployed

No deployments
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.

2 participants