telemetry-event-contract
The OTLP product-event payload is a data contract, not debug output — additive-only attribute rules, class partition, pkg/metrics schema descriptor, and how ops signals stay separate
Install / Use
npx skills add NeuralTrust/TrustGateInstalls into whichever agent you are using.
Cursor Rules
Cursor IDE rules (v2)
Quality Score
Category
LegalSupported Platforms
Tags
Our assessment of telemetry-event-contract
telemetry-event-contract scores 57/100 on our quality scale, 202nd of 213 Legal skills we index.
Its Cursor Rules is 5.6 KB long, split into 7 sections and no code examples: a solid amount of guidance for an agent.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- We could not determine when the repository was last updated.
- Our last check on 2026-09-25 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
telemetry-event-contract compared with similar skills
All 4 of these similar skills score higher than telemetry-event-contract; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| telemetry-event-contract (this skill)by NeuralTrust | 57 | 0 | — | Cursor Rules |
| constraint-driven-developmentby addyosmani | 100 | 98.8k | 12d ago | SKILL.md |
| ai-native-cliby sickn33 | 100 | 46.9k | 11d ago | SKILL.md |
| atlas-ledgerby sickn33 | 100 | 46.9k | 11d ago | SKILL.md |
| legal-responseby anthropics | 99 | 25.5k | 11d ago | SKILL.md |
Frequently asked questions
- How do I install telemetry-event-contract?
- Run
npx skills add NeuralTrust/TrustGate. The install tabs above show the steps for each supported agent. - Which AI agents does telemetry-event-contract work with?
- It is written for Cursor, as a Cursor Rules file. Other agents that read the same format can often use it too.
- Is telemetry-event-contract safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is telemetry-event-contract still maintained?
- We could not determine when the repository was last updated.
Skill content
View source on GitHubdescription: The OTLP product-event payload is a data contract, not debug output — additive-only attribute rules, class partition, pkg/metrics schema descriptor, and how ops signals stay separate globs: ["pkg/infra/telemetry/", "pkg/infra/metrics/", "pkg/app/metrics/", "pkg/metrics/", "pkg/infra/o11y/", "docs/telemetry/"] alwaysApply: false
Telemetry is a data contract
TrustGate emits one OTLP log record per completed request (pkg/infra/telemetry/otlp).
Operators do not just read those records — they load them into typed tables and build
billing, usage and reporting on top. The attribute keys are effectively column names.
Treat every change under the globs above as a schema migration on someone else's database, not as a refactor of log output.
Why this needs a rule: the failure is silent
Consumers read attributes by literal key. Nothing in the pipeline validates the payload, so a producer-side mistake does not raise an error anywhere:
| Producer change | What the consumer sees |
|---|---|
| Rename an attribute key | Column silently becomes empty / 0, forever |
| Change a value's type (number → string, string → JSON) | Cast yields a zero value, or the row fails to parse |
| Stop emitting a join key | Records can no longer be correlated, or are discarded |
| Emit a body attribute on a metadata record | The record is reclassified and leaves the metadata stream |
| Reorder or retype pkg/metrics columns | Out-of-tree storage adapters generate different DDL |
There is no schema registry and no cross-repo contract test. This rule and the tests in
pkg/infra/telemetry/otlp are the only guardrails.
Rules
- Additive only. Never rename, remove or retype an attribute key that ships today. Add a new key beside the old one and keep emitting both until consumers have migrated.
- Keys are constants. Attribute keys live as
constinpkg/infra/telemetry/otlp/mapping.go. Never build an attribute key from request, tenant or plugin data — dynamic keys are unqueryable and blow up storage cardinality. Dynamic values are fine. - The log body stays empty. All payload travels in attributes. Do not start using the body as an escape hatch for structured data.
- The class partition is load-bearing.
metadatarecords carry no body attributes;rawrecords carry bodies plus join keys only. Consumers separate the two streams by the presence oftrustgate.request.body/trustgate.response.body, so adding a body attribute to a metadata record does not "add a field" — it moves the record. - Join keys are not optional. Emit
trustgate.trace_id,trustgate.gateway_idandtrustgate.tenant_idwhenever they are known, on both classes. A consumer that keys on tenant may drop a record that lacks it. - Types are part of the key. Numeric attributes stay numeric, bools stay bools, and
the JSON-encoded string attributes (
trustgate.policy_chain,trustgate.attempts) stay JSON strings — do not "improve" them into structured attributes. event.nameis the routing key. It istrustgate.<schema>.<class>, derived fromevents.SchemaVersion. Bumping that constant changes the event name for every record, so it is a deliberate, announced break — not the way to ship a new field.- Update the contract doc in the same change.
docs/telemetry/otlp-metadata-contract.mdis the published description of this payload; a code change that leaves it stale ships a lie to operators. Extend the mapping tests in the same commit.
pkg/metrics is a published schema descriptor
RawColumns(), InsertColumns(), TableName and the Column* constants exist so that
storage adapters — including ones outside this repository — can generate DDL from the Go
package. Changing a name, type, nullability or order there changes those tables.
Bump metrics.SchemaVersion and add a migration under pkg/metrics/migrations; never edit
a column definition in place. Note that metrics.SchemaVersion (storage) and
events.SchemaVersion (event payload) are independent — do not assume they move together.
Operational signals are a different pipeline
pkg/infra/o11y (traces + metrics, OPS_* env vars) exists to operate the process. It is
not the product-event path and must never become one:
- Never move a business field into an ops span or metric, and never make a product event depend on an ops provider being enabled.
- Ops attributes stay bounded — plane, route, outcome, status class. No tenant or consumer identifiers, no full URLs or query strings, no bodies. Unbounded labels are a cost and cardinality incident on the metrics backend.
- Product events must keep working when ops telemetry is off, and vice versa.
Sensitive data
- Request/response bodies exist only on the
rawclass, and only afterevents.SanitizeBody/RedactHeaders/SanitizeExtras. - Never add an attribute to the metadata class that can carry prompt or response content, credentials, or raw headers.
- Never bypass the sanitizers to "keep the payload faithful" — an operator's analytics store is not an appropriate place for unredacted credentials.
Before you merge a telemetry change
- [ ] No existing attribute key renamed, removed or retyped
- [ ] New keys are constants, documented in
docs/telemetry/otlp-metadata-contract.md - [ ] Metadata records still carry no body attributes; raw records still carry no metadata
- [ ]
pkg/metricscolumn list unchanged, or accompanied by a version bump + migration - [ ]
go test ./pkg/infra/telemetry/... ./pkg/infra/metrics/... ./pkg/metrics/...passes
Related Skills
constraint-driven-development
98.8kEstablishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-i…
ai-native-cli
46.9kDesign spec with 98 rules for building CLI tools that AI agents can safely use. Covers structured JSON output, error handling, input contracts, safety guardrails, exit codes, and agent self-description.
atlas-ledger
46.9kCompanion to atlas-contract. Auto-invoked by its Final Audit on caught drift; also use after Post Reviews or user requests to record a mistake. Distills drift into WHEN/DON'T/INSTEAD clauses, writes to Atlas.md after confirmation.
legal-response
25.5kGenerate a response to a common legal inquiry using configured templates, with built-in escalation checks for situations that shouldn't use a templated reply
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
