Commit 9f8ed47
feat: Add Spectra Collector exporter integration (#197)
* docs: Add design for Spectra Collector exporter integration
Design document and brainstorm outputs for adding SpectraExporterOptions
to observability-core, enabling Weave/Copilot Cowork to export traces via
OTLP to Spectra Collector sidecars instead of the A365 API.
Key decisions:
- New SpectraExporterOptions class with K8s sidecar defaults
- Union type dispatch on configure() exporter_options parameter
- Move suppress_invoke_agent_input to enrichment layer for exporter-agnostic suppression
- Protocol validation, module-level gRPC import, export surface symmetry
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: Add SpectraExporterOptions class for Spectra Collector sidecar export
Introduces SpectraExporterOptions with fields for endpoint, protocol
(grpc/http), insecure flag, and batch settings. Defaults are tuned for
K8s sidecar topology (localhost:4317, gRPC, insecure).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: Add excluded_attribute_keys to EnrichedReadableSpan
Extends EnrichedReadableSpan with an optional excluded_attribute_keys
parameter that removes specified keys after merging extras. Existing
callers are unaffected (defaults to empty set).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: Move suppress_invoke_agent_input from exporter to batch processor
Moves the InvokeAgent input message suppression from
_Agent365Exporter._map_span() to _EnrichingBatchSpanProcessor.on_end()
so it works with any exporter (A365, Spectra, or OTLP bolt-on).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: Add Spectra exporter dispatch to configure()
Adds isinstance-based dispatch in _configure_internal() to create
GrpcOTLPSpanExporter or OTLPSpanExporter when SpectraExporterOptions
is provided. Updates exporter_options type to union on all three
configure() signatures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: Export SpectraExporterOptions and Agent365ExporterOptions from public API
Adds both exporter options classes to the core package's public API
for consistent import ergonomics.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test: Add Spectra exporter tests and update A365 regression test
Adds test_spectra_exporter.py with 13 tests covering:
- SpectraExporterOptions defaults and validation
- configure() with Spectra options (gRPC, HTTP, custom endpoint)
- A365 env var ignored when Spectra options provided
- Batch settings extraction, OTLP bolt-on interaction
- suppress_invoke_agent_input in batch processor
- EnrichedReadableSpan excluded_attribute_keys
Updates test_agent365.py to reflect suppress_invoke_agent_input
being moved from _Agent365Exporter to _EnrichingBatchSpanProcessor.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Update prompt suppression tests for processor-based suppression
Updates test_prompt_suppression.py to test suppress_invoke_agent_input
on _EnrichingBatchSpanProcessor instead of _Agent365Exporter, reflecting
the refactor that moved suppression to the processor layer.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Address PR review feedback from Copilot
- Make default endpoint protocol-aware: 4317 for gRPC, 4318 for HTTP
- Add suppress_invoke_agent_input as explicit param on public configure()
- Fix insecure default from False to True in brainstorm docs (BRAINSTORM.md,
TLDR.md, ARCHITECTURE.md) to match implementation
- Add tests for HTTP default endpoint and explicit endpoint override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Update remaining insecure=False reference in brainstorm changelog
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: Remove brainstorm and design documents for Spectra exporter
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 51801b3 commit 9f8ed47
10 files changed
Lines changed: 456 additions & 50 deletions
File tree
- libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core
- exporters
- tests/observability
- core
- extensions/openai
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
Lines changed: 39 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
61 | | - | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| |||
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
103 | | - | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
159 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
160 | 179 | | |
161 | 180 | | |
162 | 181 | | |
163 | 182 | | |
164 | | - | |
165 | 183 | | |
166 | 184 | | |
167 | 185 | | |
168 | 186 | | |
169 | 187 | | |
170 | | - | |
| 188 | + | |
| 189 | + | |
171 | 190 | | |
172 | 191 | | |
173 | 192 | | |
174 | 193 | | |
175 | 194 | | |
176 | 195 | | |
177 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
178 | 201 | | |
179 | 202 | | |
180 | 203 | | |
| |||
248 | 271 | | |
249 | 272 | | |
250 | 273 | | |
251 | | - | |
| 274 | + | |
| 275 | + | |
252 | 276 | | |
253 | 277 | | |
254 | 278 | | |
| |||
261 | 285 | | |
262 | 286 | | |
263 | 287 | | |
264 | | - | |
265 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
266 | 292 | | |
267 | 293 | | |
268 | 294 | | |
| |||
272 | 298 | | |
273 | 299 | | |
274 | 300 | | |
| 301 | + | |
275 | 302 | | |
276 | 303 | | |
277 | 304 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
Lines changed: 0 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
| |||
59 | 54 | | |
60 | 55 | | |
61 | 56 | | |
62 | | - | |
63 | 57 | | |
64 | 58 | | |
65 | 59 | | |
| |||
69 | 63 | | |
70 | 64 | | |
71 | 65 | | |
72 | | - | |
73 | 66 | | |
74 | 67 | | |
75 | 68 | | |
| |||
270 | 263 | | |
271 | 264 | | |
272 | 265 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | 266 | | |
287 | 267 | | |
288 | 268 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| 45 | + | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
68 | 84 | | |
69 | 85 | | |
70 | 86 | | |
| |||
83 | 99 | | |
84 | 100 | | |
85 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
86 | 116 | | |
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments