Summary
@slack/webhook v8 has an internal addAppMetadata function in src/instrument.ts that allows prepending custom app identity to the User-Agent header. However, it is not exported from the package's public API (src/index.ts).
@slack/web-api exports addAppMetadata publicly, allowing downstream tools to register themselves for instrumentation. The webhook package should do the same for consistency.
Use case
In slack-github-action, we want to register the action's name and version so Slack can see which tool is making webhook requests:
import { addAppMetadata } from "@slack/webhook";
addAppMetadata({ name: "@slack/slack-github-action", version: "3.0.3" });
Currently we work around this by injecting a custom User-Agent via the fetch option, but having the public export would be cleaner and consistent with web-api.
Proposed change
Export addAppMetadata from packages/webhook/src/index.ts:
export { addAppMetadata } from './instrument.js';
Summary
@slack/webhookv8 has an internaladdAppMetadatafunction insrc/instrument.tsthat allows prepending custom app identity to the User-Agent header. However, it is not exported from the package's public API (src/index.ts).@slack/web-apiexportsaddAppMetadatapublicly, allowing downstream tools to register themselves for instrumentation. The webhook package should do the same for consistency.Use case
In slack-github-action, we want to register the action's name and version so Slack can see which tool is making webhook requests:
Currently we work around this by injecting a custom User-Agent via the
fetchoption, but having the public export would be cleaner and consistent with web-api.Proposed change
Export
addAppMetadatafrompackages/webhook/src/index.ts: