Skip to content

Commit

Permalink
bp/LSSHandler: support STATS_TAG
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Aug 2, 2024
1 parent 764157e commit 1811d01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,8 @@ described in this section.
- ``ACCEPT_HTTP``: create a transient HTTP listener which receives
HTTP requests from the child process; a ``LISTENER_TAG`` packet
may be present which will be echoed on all translation requests
for this listener.
for this listener. If ``STATS_TAG`` is present, it will be used
instead of ``LISTENER_TAG`` for Prometheus metrics.

The payload is the socket path inside the new mount namespace.
After the socket path, a null byte may follow with opaque data which
Expand Down
2 changes: 1 addition & 1 deletion src/bp/LSSHandler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class BpListenStreamStockHandler::HttpListener final
config.access_logger = false; // TODO?

instance.listeners.emplace_front(instance,
instance.listener_stats[config.tag],
response.stats_tag != nullptr ? instance.listener_stats[response.stats_tag] : instance.listener_stats[config.tag],
nullptr,
nullptr, // TODO?
instance.translation_service,
Expand Down

0 comments on commit 1811d01

Please sign in to comment.