@osfactory/otel-hook 0.13.2 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +43 -0
  2. package/dist/{adapter-DyCb7y1N.d.ts → adapter-D5R8lhfl.d.ts} +1 -1
  3. package/dist/cli.js +427 -37
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config.d.ts +30 -4
  6. package/dist/config.js +161 -9
  7. package/dist/config.js.map +1 -1
  8. package/dist/{destinations-C4sSKjDO.d.ts → destinations-2KrcRslo.d.ts} +92 -2
  9. package/dist/{export-destinations-BjRXDots.d.ts → export-destinations-DvoH4QOe.d.ts} +101 -9
  10. package/dist/{hook-CKLpgrYP.d.ts → hook-DVK8Don-.d.ts} +4 -4
  11. package/dist/index.d.ts +10 -10
  12. package/dist/index.js +424 -36
  13. package/dist/index.js.map +1 -1
  14. package/dist/install.d.ts +3 -3
  15. package/dist/integration.d.ts +7 -7
  16. package/dist/integration.js +376 -34
  17. package/dist/integration.js.map +1 -1
  18. package/dist/lifecycle.js +1 -1
  19. package/dist/lifecycle.js.map +1 -1
  20. package/dist/{payload-DLK7QaBB.d.ts → payload-D4r71EL-.d.ts} +1 -1
  21. package/dist/privacy.d.ts +2 -2
  22. package/dist/privacy.js +42 -1
  23. package/dist/privacy.js.map +1 -1
  24. package/dist/providers.d.ts +8 -8
  25. package/dist/{registry-DM-4YvIA.d.ts → registry-DOJh9mzB.d.ts} +2 -2
  26. package/dist/runtime.d.ts +5 -5
  27. package/dist/runtime.js +128 -2
  28. package/dist/runtime.js.map +1 -1
  29. package/dist/{schema-CD61uW99.d.ts → schema-oRsbo7WO.d.ts} +45 -0
  30. package/dist/{service-CbI9CObT.d.ts → service-DySC7KQM.d.ts} +6 -1
  31. package/dist/telemetry.d.ts +5 -4
  32. package/dist/telemetry.js +285 -15
  33. package/dist/telemetry.js.map +1 -1
  34. package/dist/testing.d.ts +5 -5
  35. package/dist/testing.js +128 -2
  36. package/dist/testing.js.map +1 -1
  37. package/package.json +1 -1
package/README.md CHANGED
@@ -1117,6 +1117,49 @@ later refuses with a non-retryable status is dropped instead of blocking the
1117
1117
  queue behind it. Every drop is counted on disk, by reason, and `otel-hook doctor`
1118
1118
  reports each destination's queued batches, bytes, and drops.
1119
1119
 
1120
+ #### Per-repository scopes
1121
+
1122
+ A `destinations[]` entry may carry `scopes`, which turn it from "every record"
1123
+ into "only these repositories, at this detail" — for example a hosted receiver
1124
+ that should see two repositories, one of them without content:
1125
+
1126
+ ```json
1127
+ {
1128
+ "name": "hosted",
1129
+ "endpoint": "https://ingest.example/v1/traces",
1130
+ "headers": { "authorization": "env:HOSTED_TOKEN" },
1131
+ "signals": ["traces", "logs", "metrics"],
1132
+ "scopes": [
1133
+ { "repositories": ["https://github.com/acme/widget"], "contentMode": "redact" },
1134
+ {
1135
+ "repositories": ["git@github.com:acme/gadget.git"],
1136
+ "signals": ["traces", "metrics"],
1137
+ "contentMode": "omit",
1138
+ "includeSessionId": false
1139
+ }
1140
+ ]
1141
+ }
1142
+ ```
1143
+
1144
+ | Field | Meaning |
1145
+ | --- | --- |
1146
+ | `repositories` | Repository URLs in any remote spelling (HTTPS, `git@host:path`, `ssh://`, or `host/path`), compared by lowercased host and path without credentials, port or `.git`; or `"*"` for every record that names a repository. |
1147
+ | `signals` | Signals sent for these repositories, intersected with the destination's own `signals`. Default: all of the destination's. |
1148
+ | `contentMode` | `omit`, `mask`, `redact` or `raw`. Lowers the disclosure `privacy.contentMode` produced, for this destination only; never raises it (`exporter.logs.includeContent` still gates log bodies). |
1149
+ | `includeSessionId` | `false` leaves `session.id` off this destination's metric points for these repositories (cumulative series are then kept across sessions). Default true; cannot turn on what `exporter.metrics.includeSessionId` turned off. |
1150
+
1151
+ A record's repository is its `vcs.repository.url.full`: the session context
1152
+ stamp (`sessionContext.dir`) for the event, else the exporter Resource
1153
+ (`--resource-attr` / `OTEL_RESOURCE_ATTRIBUTES`). The **first** scope listing it
1154
+ decides; a record that names no repository, or one no scope lists, is **not
1155
+ sent** to a scoped destination. A span is judged by its end edge when the end is
1156
+ in the same batch. Metric points are filtered point by point, so one callback's
1157
+ points can split across destinations. Filtering happens before mapping, so a
1158
+ scoped destination's spool only ever holds what passed its scopes. A destination
1159
+ without `scopes`, and the `default` destination, keep receiving everything.
1160
+ `otel-hook doctor` lists each destination's scopes; the exported configuration
1161
+ snapshot carries only their count.
1162
+
1120
1163
  ### Resource attributes
1121
1164
 
1122
1165
  `exporter.resourceAttributes` adds custom attributes to the OTLP Resource every
@@ -4,7 +4,7 @@ import { I as UsageTemporality, n as ModelDescriptor, b as CanonicalEvent, u as
4
4
  import { I as IdentityClaim, d as InvocationIdentity } from './identity-BrVBs901.js';
5
5
  import { R as ResolvedProviderId, g as ProviderId, h as SourceTransport, d as EventId } from './primitives-CJ8-rn-f.js';
6
6
  import { e as PrivacyLimits } from './policy-CimmCfRp.js';
7
- import { P as PrivacyService } from './service-CbI9CObT.js';
7
+ import { P as PrivacyService } from './service-DySC7KQM.js';
8
8
  import { C as Clock, I as IdGenerator, d as Logger } from './ports-DhpSDIkp.js';
9
9
  import { A as AttributionOutcome, a as AttributionReason } from './taxonomy-DwhTtuWd.js';
10
10