一键导入
graphsignal-context
// Fetch Graphsignal signal context via the graphsignal-context CLI. Use when the user needs signal context, time-range queries for signals/profiles/errors, signal guide content, or CLI access to the context APIs.
// Fetch Graphsignal signal context via the graphsignal-context CLI. Use when the user needs signal context, time-range queries for signals/profiles/errors, signal guide content, or CLI access to the context APIs.
| name | graphsignal-context |
| description | Fetch Graphsignal signal context via the graphsignal-context CLI. Use when the user needs signal context, time-range queries for signals/profiles/errors, signal guide content, or CLI access to the context APIs. |
Fetch signal context and signal guide content from Graphsignal (api.graphsignal.com).
Install (from PyPI):
pip install graphsignal-context
Login (once). API key is stored in ~/.graphsignal/config.yml:
graphsignal-context login
Alternatively, set GRAPHSIGNAL_API_KEY in the environment; the CLI uses it if present.
If not logged in, signals and guide exit with: "Not logged in. Run: graphsignal-context login".
graphsignal-context signals --start <ISO8601> --end <ISO8601> [--tags "key:value;..."]
2026-03-10T00:00:00Z.--start.key:value pairs. Example: env:prod;service:api. Tags must be known exactly—they are the same tags sent to Graphsignal when the application was instrumented (e.g. from graphsignal.configure() or the SDK).The CLI calls GET https://api.graphsignal.com/api/v1/context/signals/ with start_time_ns, end_time_ns, and optional tags, and prints the response context field.
graphsignal-context guide
Fetch guide content about signals and print it to stdout.
The CLI calls GET https://api.graphsignal.com/api/v1/context/guide/ and prints the returned text content.
# Last two days (adjust dates to your window)
graphsignal-context signals --start 2026-03-10T00:00:00Z --end 2026-03-12T00:00:00Z
# With tag filter
graphsignal-context signals --start 2026-03-10T00:00:00Z --end 2026-03-12T00:00:00Z --tags "env:production"
graphsignal-context signals with the appropriate --start and --end (ISO 8601 UTC).graphsignal-context guide.graphsignal-context login or set GRAPHSIGNAL_API_KEY.signals output JSON to answer questions about profiles, errors, traces, or metrics in that window.signals response includes available_tags — all metric tag keys with their most recent values. Use these to re-fetch context with --tags for a specific host, process, GPU device, etc. when you need more targeted optimization (e.g. --tags "host.name:gpu-server-01" or --tags "device.index:0").