-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Add Spectra Collector exporter integration #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d01673e
docs: Add design for Spectra Collector exporter integration
juliomenendez 93242e7
feat: Add SpectraExporterOptions class for Spectra Collector sidecar …
juliomenendez bed464c
feat: Add excluded_attribute_keys to EnrichedReadableSpan
juliomenendez 225aac9
refactor: Move suppress_invoke_agent_input from exporter to batch pro…
juliomenendez ce34a50
feat: Add Spectra exporter dispatch to configure()
juliomenendez e1ed626
feat: Export SpectraExporterOptions and Agent365ExporterOptions from …
juliomenendez 1e7aa8a
test: Add Spectra exporter tests and update A365 regression test
juliomenendez 900af51
fix: Update prompt suppression tests for processor-based suppression
juliomenendez 398b345
fix: Address PR review feedback from Copilot
juliomenendez 6b342f3
fix: Update remaining insecure=False reference in brainstorm changelog
juliomenendez ab17a38
chore: Remove brainstorm and design documents for Spectra exporter
juliomenendez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...ility-core/microsoft_agents_a365/observability/core/exporters/spectra_exporter_options.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. | ||
|
|
||
| from typing import Literal | ||
|
|
||
|
|
||
| class SpectraExporterOptions: | ||
| """ | ||
| Configuration for exporting traces to a Spectra Collector sidecar via OTLP. | ||
|
|
||
| Spectra Collector is deployed as a Kubernetes sidecar that accepts | ||
| standard OTLP telemetry on localhost. Defaults are tuned for this | ||
| deployment topology — most consumers should not need to override them. | ||
|
|
||
| Note: Batch processor fields (max_queue_size, scheduled_delay_ms, etc.) | ||
| are duplicated from Agent365ExporterOptions intentionally — these two | ||
| options classes have no shared base class per design decision C4. | ||
| """ | ||
|
|
||
| _DEFAULT_GRPC_ENDPOINT = "http://localhost:4317" | ||
| _DEFAULT_HTTP_ENDPOINT = "http://localhost:4318" | ||
|
|
||
| def __init__( | ||
| self, | ||
| endpoint: str | None = None, | ||
| protocol: Literal["grpc", "http"] = "grpc", | ||
| insecure: bool = True, | ||
| max_queue_size: int = 2048, | ||
| scheduled_delay_ms: int = 5000, | ||
| exporter_timeout_ms: int = 30000, | ||
| max_export_batch_size: int = 512, | ||
| ): | ||
| """ | ||
| Args: | ||
| endpoint: Spectra sidecar OTLP endpoint. Defaults to | ||
| http://localhost:4317 for gRPC or http://localhost:4318 for HTTP. | ||
| protocol: OTLP protocol — "grpc" or "http". Default: grpc. | ||
| insecure: Use insecure (no TLS) connection. Default: True (localhost sidecar). | ||
| max_queue_size: Batch processor queue size. Default: 2048. | ||
| scheduled_delay_ms: Export interval in milliseconds. Default: 5000. | ||
| exporter_timeout_ms: Export timeout in milliseconds. Default: 30000. | ||
| max_export_batch_size: Max spans per export batch. Default: 512. | ||
| """ | ||
| if protocol not in ("grpc", "http"): | ||
| raise ValueError(f"protocol must be 'grpc' or 'http', got '{protocol}'") | ||
| if endpoint is None: | ||
| endpoint = ( | ||
| self._DEFAULT_GRPC_ENDPOINT if protocol == "grpc" else self._DEFAULT_HTTP_ENDPOINT | ||
| ) | ||
| self.endpoint = endpoint | ||
| self.protocol = protocol | ||
| self.insecure = insecure | ||
| self.max_queue_size = max_queue_size | ||
| self.scheduled_delay_ms = scheduled_delay_ms | ||
| self.exporter_timeout_ms = exporter_timeout_ms | ||
| self.max_export_batch_size = max_export_batch_size | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.