Skip to content

Commit

Permalink
new tracing: package bumps and changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeier committed Mar 11, 2025
1 parent 29766c5 commit 0c56439
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
9 changes: 9 additions & 0 deletions trace-dispatcher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Revision history for trace-dispatcher

## NEXT

* New `PrometheusSimple` backend which runs a simple TCP server for direct exposition of metrics, without forwarding.
* New `maxReconnectDelay` config option in `TraceOptionForwarder`: Specifies maximum delay (seconds) between (re-)connection attempts of a forwarder (default: 60s).
* Optimize data sharing in formatters.
* Remove unused optional namespace prefix argument from formatters.
* Updated to use `ekg-forward-0.9`.
* Remove `ekg-wai` from dependencies.

## 2.8.1 -- Feb 2025

* Updated to `ouroboros-network-framework-0.16`
Expand Down
14 changes: 10 additions & 4 deletions trace-dispatcher/doc/trace-dispatcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,12 @@ The configurability of dispatchers provided by this library relies on:
The usual form to provide a configuration is via a configuration file, wich can be in JSON or YAML format. The options that
can be given based on a namespace are: `severity`, `detail`, `backends` and `limiter`.

Backends can be a combination of `Forwarder`, `EKGBackend`, and
one of `Stdout MachineFormat`, `tdout HumanFormatColoured` and `Stdout HumanFormatUncoloured`.
Backends can be a combination of `Forwarder`, `EKGBackend`, `PrometheusSimple [bindhost] <port>` and
one of `Stdout MachineFormat`, `Stdout HumanFormatColoured` and `Stdout HumanFormatUncoloured`.

The (optional) `PrometheusSimple` backend provides Prometheus metrics _directly from the process_, without forwarding. It always applies to all tracers globally, and should only be configured once.
Providing an available port number in the connection string is mandatory; this will bind to localhost only by default. By specifying a bind host, the metrics can be queried remotely, e.g. over IPv4 by
binding to `0.0.0.0`, or IPv6 by binding to `::`. *CAUTION*: Generally allowing remote queries of Prometheus metrics is risky and should only be done in an environment you control.

```yaml
# Use new tracing
Expand All @@ -320,6 +324,7 @@ TraceOptions:
- Stdout MachineFormat
- EKGBackend
- Forwarder
- 'PrometheusSimple :: 1234' # Prometheus metrics available over IPv6 (and localhost) on port 1234

ChainDB: # Show as well messages with severity Info for all ChainDB traces.
severity: Info
Expand Down Expand Up @@ -353,7 +358,8 @@ The same in JSON looks like this:
"backends": [
"Stdout MachineFormat",
"EKGBackend",
"Forwarder"
"Forwarder",
"PrometheusSimple :: 1234"
]
},
"ChainDB": {
Expand Down Expand Up @@ -708,7 +714,7 @@ As mentioned earlier, trace backends serve as the final destinations for all tra

```haskell
ekgTracer :: MonadIO m
=> Either Metrics.Store Server
=> Metrics.Store
-> m (Trace m FormattedMessage)
```

Expand Down

0 comments on commit 0c56439

Please sign in to comment.