Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
tailscale2otel
command
Command tailscale2otel polls the Tailscale API and exports OTEL metrics + logs.
|
Command tailscale2otel polls the Tailscale API and exports OTEL metrics + logs. |
|
internal
|
|
|
aclpolicy
Package aclpolicy compiles a Tailscale network policy and decides whether an observed connection is explained by it.
|
Package aclpolicy compiles a Tailscale network policy and decides whether an observed connection is explained by it. |
|
annotations
Package annotations publishes a curated, closed set of tailnet events into Grafana as annotations, so a dashboard can answer "what changed at 14:00" from tailscale2otel itself rather than from an external automation (#518).
|
Package annotations publishes a curated, closed set of tailnet events into Grafana as annotations, so a dashboard can answer "what changed at 14:00" from tailscale2otel itself rather than from an external automation (#518). |
|
apistate
Package apistate models the availability of an individual Tailscale API operation, and the coverage of per-entity subrequests.
|
Package apistate models the availability of an individual Tailscale API operation, and the coverage of per-entity subrequests. |
|
app
Package app wires configuration, telemetry, the Tailscale client, the device cache, and the collector scheduler into a runnable service.
|
Package app wires configuration, telemetry, the Tailscale client, the device cache, and the collector scheduler into a runnable service. |
|
app/apicontract
Package apicontract is the versioning/publishing/compatibility-checking engine for tailscale2otel's read-only admin JSON API (#323): /api/status.json, /api/config.json, /api/cardinality.json, /api/flows.json, /api/events.json, and /api/flows/export.json.
|
Package apicontract is the versioning/publishing/compatibility-checking engine for tailscale2otel's read-only admin JSON API (#323): /api/status.json, /api/config.json, /api/cardinality.json, /api/flows.json, /api/events.json, and /api/flows/export.json. |
|
app/eventsdata
Package eventsdata is the wire and template contract for the built-in audit/webhook event explorer (#300): Response is what /api/events.json returns, Page is the server-rendered shell of /events.
|
Package eventsdata is the wire and template contract for the built-in audit/webhook event explorer (#300): Response is what /api/events.json returns, Page is the server-rendered shell of /events. |
|
app/eventshtml
Package eventshtml renders the built-in audit/webhook event explorer at /events (#300).
|
Package eventshtml renders the built-in audit/webhook event explorer at /events (#300). |
|
app/flowhtml
Package flowhtml renders the built-in flow view at /flows.
|
Package flowhtml renders the built-in flow view at /flows. |
|
app/flowsdata
Package flowsdata is the wire and template contract for the built-in flow view: Response is what /api/flows.json returns, Page is the server-rendered shell of /flows.
|
Package flowsdata is the wire and template contract for the built-in flow view: Response is what /api/flows.json returns, Page is the server-rendered shell of /flows. |
|
app/statusdata
Package statusdata defines the data model rendered by the admin status page (internal/app/statushtml) and served verbatim as JSON at /api/status.json.
|
Package statusdata defines the data model rendered by the admin status page (internal/app/statushtml) and served verbatim as JSON at /api/status.json. |
|
app/statushtml
Package statushtml renders the admin status page from a statusdata.Status.
|
Package statushtml renders the admin status page from a statusdata.Status. |
|
appcatalog
Package appcatalog holds the app layer's self-observability metric descriptors (the heartbeat up gauge and the Tailscale API request/retry counters) as the SINGLE SOURCE OF TRUTH for both their emission and their documentation.
|
Package appcatalog holds the app layer's self-observability metric descriptors (the heartbeat up gauge and the Tailscale API request/retry counters) as the SINGLE SOURCE OF TRUTH for both their emission and their documentation. |
|
audit
Package audit defines the Tailscale configuration audit log record types and (in processor.go) the conversion to OTEL log records and counters.
|
Package audit defines the Tailscale configuration audit log record types and (in processor.go) the conversion to OTEL log records and counters. |
|
catalog
Package catalog aggregates every emitting package's in-code telemetry catalog (the metricdoc.Metric / metricdoc.LogEvent descriptors declared next to each emit site) into the single, ordered source of truth that the docs generator renders into docs/metrics.md.
|
Package catalog aggregates every emitting package's in-code telemetry catalog (the metricdoc.Metric / metricdoc.LogEvent descriptors declared next to each emit site) into the single, ordered source of truth that the docs generator renders into docs/metrics.md. |
|
certreload
Package certreload serves TLS certificates that can be rotated underneath a running listener.
|
Package certreload serves TLS certificates that can be rotated underneath a running listener. |
|
collector
Package collector defines the pluggable data-source model: the Collector interfaces every source implements, a Registry of enabled collectors, the checkpoint store for time-window pollers, and the Scheduler that drives them.
|
Package collector defines the pluggable data-source model: the Collector interfaces every source implements, a Registry of enabled collectors, the checkpoint store for time-window pollers, and the Scheduler that drives them. |
|
collector/acl
Package acl is a snapshot collector for the tailnet ACL policy file.
|
Package acl is a snapshot collector for the tailnet ACL policy file. |
|
collector/auditlogs
Package auditlogs implements the "auditlogs" window collector.
|
Package auditlogs implements the "auditlogs" window collector. |
|
collector/contacts
Package contacts is a snapshot collector for the tailnet's account/support/ security contacts.
|
Package contacts is a snapshot collector for the tailnet's account/support/ security contacts. |
|
collector/devices
Package devices implements the "devices" snapshot collector.
|
Package devices implements the "devices" snapshot collector. |
|
collector/dns
Package dns is a snapshot collector for the tailnet DNS configuration.
|
Package dns is a snapshot collector for the tailnet DNS configuration. |
|
collector/flowlogs
Package flowlogs implements the "flowlogs" polling collector: the POLL path for Tailscale network flow logs.
|
Package flowlogs implements the "flowlogs" polling collector: the POLL path for Tailscale network flow logs. |
|
collector/keys
Package keys is a snapshot collector that reports Tailscale auth/API key inventory: per-key expiry time, aggregate counts grouped by type and auth sub-kind (plus revoked/invalid state), and a warning log event for keys nearing expiry.
|
Package keys is a snapshot collector that reports Tailscale auth/API key inventory: per-key expiry time, aggregate counts grouped by type and auth sub-kind (plus revoked/invalid state), and a warning log event for keys nearing expiry. |
|
collector/logstream
Package logstream is a stateful snapshot collector for the tailnet's configuration/network log-streaming DELIVERY HEALTH (GET /logging/{type}/stream/status) — Tailscale's own view of whether it is successfully delivering audit/flow logs to the configured SIEM sink.
|
Package logstream is a stateful snapshot collector for the tailnet's configuration/network log-streaming DELIVERY HEALTH (GET /logging/{type}/stream/status) — Tailscale's own view of whether it is successfully delivering audit/flow logs to the configured SIEM sink. |
|
collector/nodemetrics
Package nodemetrics implements a gated snapshot collector that scrapes a configured list of Prometheus-text /metrics endpoints (for example the per-node metrics tailscaled exposes) and re-emits every sample centrally through the shared telemetry.Emitter.
|
Package nodemetrics implements a gated snapshot collector that scrapes a configured list of Prometheus-text /metrics endpoints (for example the per-node metrics tailscaled exposes) and re-emits every sample centrally through the shared telemetry.Emitter. |
|
collector/oauthapps
Package oauthapps is a snapshot collector reporting Tailscale OAuth application inventory: an aggregate count plus per-app scope and allowed-node-attribute cardinality (scope-sprawl signals, mirroring the keys collector's tailscale.key.scopes precedent) and an info log per app.
|
Package oauthapps is a snapshot collector reporting Tailscale OAuth application inventory: an aggregate count plus per-app scope and allowed-node-attribute cardinality (scope-sprawl signals, mirroring the keys collector's tailscale.key.scopes precedent) and an info log per app. |
|
collector/objectstore
Package objectstore implements provider-neutral, multi-signal object-store ingestion.
|
Package objectstore implements provider-neutral, multi-signal object-store ingestion. |
|
collector/postureintegrations
Package postureintegrations is a snapshot collector for the tailnet's device-posture integrations (MDM/EDR providers such as Intune).
|
Package postureintegrations is a snapshot collector for the tailnet's device-posture integrations (MDM/EDR providers such as Intune). |
|
collector/services
Package services is a snapshot collector for the tailnet's Tailscale Services (VIP services).
|
Package services is a snapshot collector for the tailnet's Tailscale Services (VIP services). |
|
collector/settings
Package settings is a snapshot collector for tailnet feature settings.
|
Package settings is a snapshot collector for tailnet feature settings. |
|
collector/users
Package users is a snapshot collector that reports Tailscale user inventory: aggregate counts grouped by role/status/type, plus per-user device count, connection state, and last-seen time.
|
Package users is a snapshot collector that reports Tailscale user inventory: aggregate counts grouped by role/status/type, plus per-user device count, connection state, and last-seen time. |
|
collector/webhooks
Package webhooks is a snapshot collector for the tailnet's configured webhook ENDPOINTS — an inventory of where Tailscale posts event notifications.
|
Package webhooks is a snapshot collector for the tailnet's configured webhook ENDPOINTS — an inventory of where Tailscale posts event notifications. |
|
config
Package config loads, defaults, and validates the tailscale2otel configuration into typed Go structs.
|
Package config loads, defaults, and validates the tailscale2otel configuration into typed Go structs. |
|
configexport
Package configexport renders the complete effective application configuration as a deterministically-keyed, redacted projection.
|
Package configexport renders the complete effective application configuration as a deterministically-keyed, redacted projection. |
|
credreload
Package credreload watches outbound-telemetry credential and TLS material on disk and hot-swaps them without a process restart (#362).
|
Package credreload watches outbound-telemetry credential and TLS material on disk and hot-swaps them without a process restart (#362). |
|
dedup
Package dedup provides a small, thread-safe, bounded de-duplication set.
|
Package dedup provides a small, thread-safe, bounded de-duplication set. |
|
enrich
Package enrich provides an in-memory cache that maps Tailscale addresses and node IDs to device metadata, used to enrich flow and audit records with human-readable device identity.
|
Package enrich provides an in-memory cache that maps Tailscale addresses and node IDs to device metadata, used to enrich flow and audit records with human-readable device identity. |
|
entityage
Package entityage holds the shared age-distribution vocabulary for tailnet entity lifecycle signals (#426).
|
Package entityage holds the shared age-distribution vocabulary for tailnet entity lifecycle signals (#426). |
|
eventstore
Package eventstore retains a bounded, recent window of audit and webhook events in memory so the admin event explorer (#300) can show what happened on a tailnet without requiring a metrics/logs backend in the loop.
|
Package eventstore retains a bounded, recent window of audit and webhook events in memory so the admin event explorer (#300) can show what happened on a tailnet without requiring a metrics/logs backend in the loop. |
|
flowlog
Package flowlog defines the Tailscale network flow log record types and (in processor.go) the conversion to OTEL metrics and logs.
|
Package flowlog defines the Tailscale network flow log record types and (in processor.go) the conversion to OTEL metrics and logs. |
|
flowstore
Package flowstore retains recent flow activity in aggregate so the admin flow view can render a tailnet's traffic without a metrics backend in the loop.
|
Package flowstore retains recent flow activity in aggregate so the admin flow view can render a tailnet's traffic without a metrics backend in the loop. |
|
flowstore/sqlitestore
Package sqlitestore is the opt-in persistent backend for the admin flow view (#294), so /flows can answer over days rather than the in-memory ring's hours and survive a restart.
|
Package sqlitestore is the opt-in persistent backend for the admin flow view (#294), so /flows can answer over days rather than the in-memory ring's hours and survive a restart. |
|
geoip
Package geoip provides optional, purely LOCAL geolocation and autonomous-system enrichment of external (non-Tailscale) IP addresses, backed by MaxMind DB (.mmdb) files on disk.
|
Package geoip provides optional, purely LOCAL geolocation and autonomous-system enrichment of external (non-Tailscale) IP addresses, backed by MaxMind DB (.mmdb) files on disk. |
|
hsapi
Package hsapi is a minimal read-only HTTP/JSON client for the Headscale control-plane API (/api/v1/*), authenticated with a Bearer API key.
|
Package hsapi is a minimal read-only HTTP/JSON client for the Headscale control-plane API (/api/v1/*), authenticated with a Bearer API key. |
|
ingest
Package ingest defines the leaf contracts shared by ingestion paths.
|
Package ingest defines the leaf contracts shared by ingestion paths. |
|
jsonbudget
Package jsonbudget bounds the memory cost of decoding one JSON response body from an upstream control-plane API.
|
Package jsonbudget bounds the memory cost of decoding one JSON response body from an upstream control-plane API. |
|
k8saudit
Processor is the single emission path for tsrecorder Kubernetes-audit objects: it converts a decoded Object (Task 1) into bounded OTEL metrics (attribute values drawn only from classify.go's Normalize*/Classify* functions, Task 2) plus one enriched log record, and converts a decoded CastHeader (Task 3) into its own session-start signal.
|
Processor is the single emission path for tsrecorder Kubernetes-audit objects: it converts a decoded Object (Task 1) into bounded OTEL metrics (attribute values drawn only from classify.go's Normalize*/Classify* functions, Task 2) plus one enriched log record, and converts a decoded CastHeader (Task 3) into its own session-start signal. |
|
listenaddr
Package listenaddr classifies HTTP listener bind addresses so a receiver can tell "only this host can reach me" from "anyone who can route to me can".
|
Package listenaddr classifies HTTP listener bind addresses so a receiver can tell "only this host can reach me" from "anyone who can route to me can". |
|
metricdoc
Package metricdoc is the single in-code source of truth for telemetry DOCUMENTATION metadata: each emitted metric and log event declares its name, unit, instrument, human description, and attribute keys here, and the emit sites reference those declarations so the description/unit cannot drift from what is documented.
|
Package metricdoc is the single in-code source of truth for telemetry DOCUMENTATION metadata: each emitted metric and log event declares its name, unit, instrument, human description, and attribute keys here, and the emit sites reference those declarations so the description/unit cannot drift from what is documented. |
|
oas
Package oas provides a minimal stdlib-only OpenAPI 3.x spec parser with $ref resolution, bounded to the subset needed for drift detection and schema-driven fuzz testing.
|
Package oas provides a minimal stdlib-only OpenAPI 3.x spec parser with $ref resolution, bounded to the subset needed for drift detection and schema-driven fuzz testing. |
|
objectstore
Package objectstore defines the provider-neutral read-only object-store contract used by durable ingestion collectors.
|
Package objectstore defines the provider-neutral read-only object-store contract used by durable ingestion collectors. |
|
portservice
Package portservice maps a transport protocol and port number to the IANA service name registered for it (e.g.
|
Package portservice maps a transport protocol and port number to the IANA service name registered for it (e.g. |
|
provider
Package provider abstracts the control plane (Tailscale or Headscale) behind a single ControlPlane interface plus a capability set, so the collectors and the app wiring stay provider-agnostic.
|
Package provider abstracts the control plane (Tailscale or Headscale) behind a single ControlPlane interface plus a capability set, so the collectors and the app wiring stay provider-agnostic. |
|
rdns
Package rdns provides best-effort, non-blocking reverse-DNS (PTR) enrichment for external IP addresses seen in flow logs.
|
Package rdns provides best-effort, non-blocking reverse-DNS (PTR) enrichment for external IP addresses seen in flow logs. |
|
redact
Package redact strips reusable credential material out of values that are about to reach a lower-trust surface — a log line, a span, the admin status page or its JSON API.
|
Package redact strips reusable credential material out of values that are about to reach a lower-trust surface — a log line, a span, the admin status page or its JSON API. |
|
release
Package release provides a cached, fail-open fetcher for an external "latest version" string plus version parse/compare helpers, shared by the self update-available check (C4) and per-device version-skew metrics (B6).
|
Package release provides a cached, fail-open fetcher for an external "latest version" string plus version parse/compare helpers, shared by the self update-available check (C4) and per-device version-skew metrics (B6). |
|
ringbuf
Package ringbuf provides a small, thread-safe, generic ring buffer.
|
Package ringbuf provides a small, thread-safe, generic ring buffer. |
|
s3
Package s3 is a minimal read-only client for S3-compatible object storage: list a prefix, fetch an object.
|
Package s3 is a minimal read-only client for S3-compatible object storage: list a prefix, fetch an object. |
|
semconv
Package semconv centralizes the OpenTelemetry attribute keys, UCUM units, and enumerated values shared across collectors and processors.
|
Package semconv centralizes the OpenTelemetry attribute keys, UCUM units, and enumerated values shared across collectors and processors. |
|
stream
Package stream implements a streaming receiver that emulates a Splunk HTTP Event Collector (HEC) endpoint so Tailscale "log streaming" can push network-flow and configuration-audit logs to this collector.
|
Package stream implements a streaming receiver that emulates a Splunk HTTP Event Collector (HEC) endpoint so Tailscale "log streaming" can push network-flow and configuration-audit logs to this collector. |
|
supportbundle
Package supportbundle assembles a privacy-safe support bundle: everything docs/troubleshooting.md's "Still stuck?" section previously asked an operator to gather and redact BY HAND (#321) — version, every configuration diagnostic, the full redacted effective config, component/API/export state, and the metric/log-event catalogs — as one deterministic, bounded archive.
|
Package supportbundle assembles a privacy-safe support bundle: everything docs/troubleshooting.md's "Still stuck?" section previously asked an operator to gather and redact BY HAND (#321) — version, every configuration diagnostic, the full redacted effective config, component/API/export state, and the metric/log-event catalogs — as one deterministic, bounded archive. |
|
telemetry
Package telemetry is the OTEL-agnostic facade that collectors use to record metrics and emit log events.
|
Package telemetry is the OTEL-agnostic facade that collectors use to record metrics and emit log events. |
|
telemetrytest
Package telemetrytest provides in-memory test helpers for asserting the OpenTelemetry output produced through the internal/telemetry Emitter.
|
Package telemetrytest provides in-memory test helpers for asserting the OpenTelemetry output produced through the internal/telemetry Emitter. |
|
tsapi
Package tsapi wraps the Tailscale API: the official tsclient for snapshot resources (devices, users, DNS, ACL, settings, webhooks, contacts) plus a thin custom doer for resources the client does not cover or under-populates (key inventory, posture, log polling, and other raw-decode endpoints).
|
Package tsapi wraps the Tailscale API: the official tsclient for snapshot resources (devices, users, DNS, ACL, settings, webhooks, contacts) plus a thin custom doer for resources the client does not cover or under-populates (key inventory, posture, log polling, and other raw-decode endpoints). |
|
tsapi/contract
Package contract holds the consumed-surface manifest — the authoritative list of Tailscale API GET operations that tailscale2otel decodes — and a decoder harness that exercises the real tsapi.Client methods against an httptest server.
|
Package contract holds the consumed-surface manifest — the authoritative list of Tailscale API GET operations that tailscale2otel decodes — and a decoder harness that exercises the real tsapi.Client methods against an httptest server. |
|
tsapi/contract/live
Package live holds the build-tagged live Tailscale API contract test.
|
Package live holds the build-tagged live Tailscale API contract test. |
|
tsscope
Package tsscope classifies Tailscale API credential scopes by privilege semantics rather than by count.
|
Package tsscope classifies Tailscale API credential scopes by privilege semantics rather than by count. |
|
webhook
Package webhook implements an HTTP receiver for Tailscale webhook events.
|
Package webhook implements an HTTP receiver for Tailscale webhook events. |
Click to show internal directories.
Click to hide internal directories.