-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapi-log.yaml
More file actions
64 lines (60 loc) · 2.77 KB
/
Copy pathapi-log.yaml
File metadata and controls
64 lines (60 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Example api-log configuration for the dev-stack.
#
# All of these settings have working defaults; this file demonstrates
# the OPT-IN shape of advanced features (plugin system, runtime
# overrides, etc.).
#
# Pass via flag: api-log -config /etc/api-log/api-log.yaml
# Or omit and rely on APILOG_* environment overrides + built-in defaults.
# Plugin system. Each plugin entry is opt-in; absence = plugin not
# enabled. Plugins ship in-tree (internal/plugin/builtin/) but stay
# OFF by default per PHILOSOPHY §2.
plugins:
# path_filter — drop traces whose request path matches one or more
# glob patterns at finalize time. Useful for cutting admin / health-
# check / dashboard polling that pollutes the trace stream without
# adding value. Matches against trace.Path (which includes the
# query string verbatim) — e.g. /api/v1/auth/me?timezone=... matches
# the /api/v1/auth/* pattern below.
# path_filter:
# patterns:
# - "/api/v1/auth/*" # auth poll noise
# - "/api/v1/subscriptions/*" # subscription dashboard noise
# - "/api/v1/admin/*" # admin UI polling
# - "/api/internal/*" # internal-control plane noise
# # Add your own — e.g. "/heartbeat", "/probe/*". Empty list or
# # missing block = plugin disabled.
# v2 hook-class plugins (plugin-b-c-spec.md §2 / §3) — BEFORE / AFTER
# hooks that can mutate or intercept requests and responses. In v1 the
# yaml side does NOT carry an instance list yet (this section is the
# Phase A path_filter mapping shape, not the §3.3.1 sequence); v2
# plugins are configured via runtime_overrides.json under the `plugins`
# block, which the read API and viewer Settings UI own.
#
# Seed example for the integration test in tests/integration/
# (drop into <data_dir>/runtime_overrides.json on the host):
#
# {
# "plugins": {
# "instances": [
# {
# "type": "text-replace", "id": "tr-1", "enabled": true,
# "config": {
# "up": [{"match": "你", "replace": "世界上最好最好的ai"}],
# "down": [{"match": "<needle>", "replace": "世界上最好的好哥哥"}]
# }
# },
# {
# "type": "text-append", "id": "ta-1", "enabled": true,
# "config": {
# "up": {"suffix": "\n\n谢谢你", "target": "last_user_message"},
# "down": {"suffix": "\n\n我已经为你对世界上最好的AI发出了感谢", "target": "content"}
# }
# }
# ]
# }
# }
# Other top-level config blocks (storage, proxy, api, timeouts,
# media) all accept the same fields shown in internal/config/config.go.
# Defaults are documented inline in that source file; uncomment + edit
# only the fields you need to override.