-
Notifications
You must be signed in to change notification settings - Fork 10
Add exporter options and other functionality #63
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
13 commits
Select commit
Hold shift + click to select a range
12aaeaf
updates to baggage and scope
nikhilc-microsoft 9b2473a
add tests for new functionality
nikhilc-microsoft ae1e321
fix tests
nikhilc-microsoft da09c7d
Update libraries/microsoft-agents-a365-observability-core/microsoft_a…
nikhilNava 84099db
Update libraries/microsoft-agents-a365-observability-core/microsoft_a…
nikhilNava b749015
Update libraries/microsoft-agents-a365-observability-core/microsoft_a…
nikhilNava 2742afa
Update libraries/microsoft-agents-a365-observability-core/microsoft_a…
nikhilNava 87f4e34
Update libraries/microsoft-agents-a365-observability-core/microsoft_a…
nikhilNava 2d79fe1
Update libraries/microsoft-agents-a365-observability-core/microsoft_a…
nikhilNava d742519
Update libraries/microsoft-agents-a365-observability-core/microsoft_a…
nikhilNava addb816
Remove redundant null check in conversation ID extraction (#64)
Copilot 297bb02
Fix copyright header in utils.py to use standard Microsoft format (#65)
Copilot 3f2fa39
Update libraries/microsoft-agents-a365-observability-core/microsoft_a…
nikhilNava 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
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
39 changes: 39 additions & 0 deletions
39
...lity-core/microsoft_agents_a365/observability/core/exporters/agent365_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,39 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. | ||
|
|
||
| from typing import Awaitable, Callable, Optional | ||
|
|
||
|
|
||
| class Agent365ExporterOptions: | ||
| """ | ||
| Configuration for Agent365Exporter. | ||
| Only cluster_category and token_resolver are required for core operation. | ||
| """ | ||
|
|
||
| def __init__( | ||
| self, | ||
| cluster_category: str = "prod", | ||
| token_resolver: Optional[Callable[[str, str], Awaitable[Optional[str]]]] = None, | ||
| use_s2s_endpoint: bool = False, | ||
nikhilNava marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| max_queue_size: int = 2048, | ||
| scheduled_delay_ms: int = 5000, | ||
| exporter_timeout_ms: int = 30000, | ||
| max_export_batch_size: int = 512, | ||
| ): | ||
| """ | ||
| Args: | ||
| cluster_category: Cluster region argument. Defaults to 'prod'. | ||
nikhilNava marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| token_resolver: Async callable that resolves the auth token (REQUIRED). | ||
| use_s2s_endpoint: Use the S2S endpoint instead of standard endpoint. | ||
| max_queue_size: Maximum queue size for the batch processor. Default is 2048. | ||
| scheduled_delay_ms: Delay between export batches (ms). Default is 5000. | ||
| exporter_timeout_ms: Timeout for the export operation (ms). Default is 30000. | ||
| max_export_batch_size: Maximum batch size for export operations. Default is 512. | ||
| """ | ||
| self.cluster_category = cluster_category | ||
| self.token_resolver = token_resolver | ||
| self.use_s2s_endpoint = use_s2s_endpoint | ||
| 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
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
21 changes: 21 additions & 0 deletions
21
...65-observability-core/microsoft_agents_a365/observability/core/models/operation_source.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,21 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. | ||
|
|
||
| """Operation source enumeration for Agent365 SDK.""" | ||
|
|
||
| from enum import Enum | ||
|
|
||
|
|
||
| class OperationSource(Enum): | ||
| """ | ||
| Enumeration representing the source of an operation. | ||
| """ | ||
|
|
||
| SDK = "SDK" | ||
| """Operation executed by SDK.""" | ||
|
|
||
| GATEWAY = "Gateway" | ||
| """Operation executed by Gateway.""" | ||
|
|
||
| MCP_SERVER = "MCPServer" | ||
| """Operation executed by MCP Server.""" |
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.