microsoft-opentelemetry 0.1.0a1__tar.gz

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 (115) hide show
  1. microsoft_opentelemetry-0.1.0a1/LICENSE +21 -0
  2. microsoft_opentelemetry-0.1.0a1/NOTICE.md +7 -0
  3. microsoft_opentelemetry-0.1.0a1/PKG-INFO +184 -0
  4. microsoft_opentelemetry-0.1.0a1/README.md +141 -0
  5. microsoft_opentelemetry-0.1.0a1/pyproject.toml +102 -0
  6. microsoft_opentelemetry-0.1.0a1/setup.cfg +4 -0
  7. microsoft_opentelemetry-0.1.0a1/src/microsoft/__init__.py +1 -0
  8. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/__init__.py +0 -0
  9. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/__init__.py +0 -0
  10. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/__init__.py +19 -0
  11. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/constants.py +133 -0
  12. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/__init__.py +131 -0
  13. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/agent_details.py +44 -0
  14. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/channel.py +14 -0
  15. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/config.py +325 -0
  16. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/constants.py +111 -0
  17. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/execute_tool_scope.py +149 -0
  18. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/exporters/__init__.py +2 -0
  19. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/exporters/agent365_exporter.py +310 -0
  20. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/exporters/agent365_exporter_options.py +50 -0
  21. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/exporters/enriched_span.py +91 -0
  22. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/exporters/enriching_span_processor.py +109 -0
  23. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/exporters/span_processor.py +183 -0
  24. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/exporters/spectra_exporter_options.py +54 -0
  25. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/exporters/utils.py +498 -0
  26. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/inference_call_details.py +22 -0
  27. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/inference_operation_type.py +12 -0
  28. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/inference_scope.py +202 -0
  29. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/invoke_agent_details.py +15 -0
  30. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/invoke_agent_scope.py +207 -0
  31. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/message_utils.py +144 -0
  32. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/middleware/__init__.py +8 -0
  33. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/middleware/baggage_builder.py +306 -0
  34. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/models/__init__.py +2 -0
  35. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/models/agent_type.py +25 -0
  36. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/models/caller_details.py +25 -0
  37. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/models/messages.py +222 -0
  38. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/models/operation_source.py +21 -0
  39. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/models/response.py +28 -0
  40. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/models/service_endpoint.py +15 -0
  41. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/models/user_details.py +22 -0
  42. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/opentelemetry_scope.py +331 -0
  43. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/request.py +21 -0
  44. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/span_details.py +28 -0
  45. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/spans_scopes/__init__.py +2 -0
  46. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/spans_scopes/output_scope.py +128 -0
  47. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/tool_call_details.py +22 -0
  48. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/tool_type.py +14 -0
  49. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/trace_processor/__init__.py +14 -0
  50. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/trace_processor/span_processor.py +77 -0
  51. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/trace_processor/util.py +49 -0
  52. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/core/utils.py +248 -0
  53. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/__init__.py +24 -0
  54. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/middleware/__init__.py +20 -0
  55. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/middleware/baggage_middleware.py +46 -0
  56. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/middleware/observability_hosting_manager.py +100 -0
  57. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/middleware/output_logging_middleware.py +187 -0
  58. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/scope_helpers/__init__.py +2 -0
  59. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/scope_helpers/populate_baggage.py +43 -0
  60. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/scope_helpers/populate_invoke_agent_scope.py +48 -0
  61. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/scope_helpers/utils.py +98 -0
  62. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/token_cache_helpers/__init__.py +11 -0
  63. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/hosting/token_cache_helpers/agent_token_cache.py +138 -0
  64. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/runtime/__init__.py +20 -0
  65. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/runtime/environment_utils.py +62 -0
  66. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/runtime/operation_error.py +58 -0
  67. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/runtime/operation_result.py +97 -0
  68. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/runtime/power_platform_api_discovery.py +91 -0
  69. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/runtime/utility.py +247 -0
  70. microsoft_opentelemetry-0.1.0a1/src/microsoft/agents/a365/observability/runtime/version_utils.py +34 -0
  71. microsoft_opentelemetry-0.1.0a1/src/microsoft/genai/__init__.py +2 -0
  72. microsoft_opentelemetry-0.1.0a1/src/microsoft/genai/_langchain/__init__.py +11 -0
  73. microsoft_opentelemetry-0.1.0a1/src/microsoft/genai/_langchain/_tracer.py +524 -0
  74. microsoft_opentelemetry-0.1.0a1/src/microsoft/genai/_langchain/_tracer_instrumentor.py +166 -0
  75. microsoft_opentelemetry-0.1.0a1/src/microsoft/genai/_langchain/_utils.py +774 -0
  76. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/__init__.py +21 -0
  77. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/__init__.py +20 -0
  78. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_autoinstrumentation/__init__.py +5 -0
  79. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_autoinstrumentation/configurator.py +69 -0
  80. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_autoinstrumentation/distro.py +65 -0
  81. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_browser_sdk_loader/__init__.py +110 -0
  82. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_browser_sdk_loader/_config.py +46 -0
  83. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_browser_sdk_loader/django_middleware.py +159 -0
  84. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_browser_sdk_loader/snippet_injector.py +460 -0
  85. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_configure.py +392 -0
  86. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_constants.py +91 -0
  87. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_diagnostics/__init__.py +5 -0
  88. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_diagnostics/diagnostic_logging.py +134 -0
  89. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_diagnostics/status_logger.py +58 -0
  90. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_types.py +25 -0
  91. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_utils/__init__.py +74 -0
  92. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_utils/configurations.py +396 -0
  93. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_utils/instrumentation.py +156 -0
  94. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/_version.py +7 -0
  95. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_azure_monitor/py.typed +7 -0
  96. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_constants.py +69 -0
  97. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_distro.py +324 -0
  98. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_instrumentation.py +164 -0
  99. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_otlp/__init__.py +17 -0
  100. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_otlp/handler.py +96 -0
  101. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_types.py +22 -0
  102. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_utils.py +116 -0
  103. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/_version.py +7 -0
  104. microsoft_opentelemetry-0.1.0a1/src/microsoft/opentelemetry/py.typed +0 -0
  105. microsoft_opentelemetry-0.1.0a1/src/microsoft_opentelemetry.egg-info/PKG-INFO +184 -0
  106. microsoft_opentelemetry-0.1.0a1/src/microsoft_opentelemetry.egg-info/SOURCES.txt +113 -0
  107. microsoft_opentelemetry-0.1.0a1/src/microsoft_opentelemetry.egg-info/dependency_links.txt +1 -0
  108. microsoft_opentelemetry-0.1.0a1/src/microsoft_opentelemetry.egg-info/entry_points.txt +2 -0
  109. microsoft_opentelemetry-0.1.0a1/src/microsoft_opentelemetry.egg-info/requires.txt +35 -0
  110. microsoft_opentelemetry-0.1.0a1/src/microsoft_opentelemetry.egg-info/top_level.txt +1 -0
  111. microsoft_opentelemetry-0.1.0a1/tests/test_distro.py +410 -0
  112. microsoft_opentelemetry-0.1.0a1/tests/test_instrumentation.py +127 -0
  113. microsoft_opentelemetry-0.1.0a1/tests/test_integration.py +81 -0
  114. microsoft_opentelemetry-0.1.0a1/tests/test_otlp.py +277 -0
  115. microsoft_opentelemetry-0.1.0a1/tests/test_smoke.py +5 -0
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,7 @@
1
+ NOTICES AND INFORMATION
2
+
3
+ This repository may incorporate or depend on third-party open source components.
4
+
5
+ When third-party notice obligations apply, the relevant notices should be included in this repository, in generated package artifacts, or made available through Microsoft's third-party notice distribution process.
6
+
7
+ As the dependency set for this project evolves, this notice file may be updated to reflect additional third-party attribution requirements.
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: microsoft-opentelemetry
3
+ Version: 0.1.0a1
4
+ Summary: Minimal template for the Microsoft OpenTelemetry distro for Python
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ License-File: NOTICE.md
9
+ Requires-Dist: azure-core<2.0.0,>=1.28.0
10
+ Requires-Dist: azure-core-tracing-opentelemetry~=1.0.0b11
11
+ Requires-Dist: azure-monitor-opentelemetry-exporter~=1.0.0b49
12
+ Requires-Dist: opentelemetry-sdk==1.40
13
+ Requires-Dist: opentelemetry-api==1.40
14
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.40
15
+ Requires-Dist: opentelemetry-instrumentation==0.61b0
16
+ Requires-Dist: opentelemetry-instrumentation-django==0.61b0
17
+ Requires-Dist: opentelemetry-instrumentation-fastapi==0.61b0
18
+ Requires-Dist: opentelemetry-instrumentation-flask==0.61b0
19
+ Requires-Dist: opentelemetry-instrumentation-psycopg2==0.61b0
20
+ Requires-Dist: opentelemetry-instrumentation-requests==0.61b0
21
+ Requires-Dist: opentelemetry-instrumentation-urllib==0.61b0
22
+ Requires-Dist: opentelemetry-instrumentation-urllib3==0.61b0
23
+ Requires-Dist: opentelemetry-instrumentation-logging==0.61b0
24
+ Requires-Dist: opentelemetry.exporter.otlp.proto.grpc==1.40
25
+ Requires-Dist: opentelemetry-resource-detector-azure<1.0.0,>=0.1.5
26
+ Requires-Dist: langchain-core>=0.2.0
27
+ Requires-Dist: wrapt>=1.0
28
+ Requires-Dist: opentelemetry-util-genai>=0.3b0
29
+ Requires-Dist: microsoft-agents-activity>=0.9.0
30
+ Requires-Dist: microsoft-agents-hosting-core>=0.9.0
31
+ Requires-Dist: aiohttp>=3.8.0
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest>=8.0; extra == "test"
34
+ Requires-Dist: pytest-cov>=5.0; extra == "test"
35
+ Provides-Extra: dev
36
+ Requires-Dist: black>=24.0; extra == "dev"
37
+ Requires-Dist: pylint>=3.3; extra == "dev"
38
+ Requires-Dist: mypy>=1.10; extra == "dev"
39
+ Requires-Dist: pyright>=1.1; extra == "dev"
40
+ Requires-Dist: pytest>=8.0; extra == "dev"
41
+ Requires-Dist: pytest-cov>=5.0; extra == "dev"
42
+ Dynamic: license-file
43
+
44
+ # microsoft-opentelemetry
45
+
46
+ [![PyPI version](https://img.shields.io/pypi/v/microsoft-opentelemetry)](https://pypi.org/project/microsoft-opentelemetry/)
47
+
48
+ ## Repository Setup
49
+
50
+ The GitHub repository was provisioned with an onboarding placeholder that indicates repository setup and access control configuration may still need to be completed in the onboarding portal.
51
+
52
+ Until that setup is complete, some repository settings or access-management actions may remain restricted.
53
+
54
+ Python package for a Microsoft OpenTelemetry distribution that provides a single onboarding experience for observability across Azure Monitor, OTLP-compatible backends, and Microsoft Agent 365 style integrations.
55
+
56
+ This repository starts from the POC described in `azure-data/microsoft-opentelemetry-distro-poc`, but is intentionally kept minimal while the package shape and delivery plan are being defined.
57
+
58
+ ## Goal
59
+
60
+ The target package should reduce fragmented setup across multiple observability stacks to one import and one configuration function.
61
+
62
+ Intended API shape:
63
+
64
+ ```python
65
+ from microsoft.opentelemetry import use_microsoft_opentelemetry
66
+
67
+ use_microsoft_opentelemetry(
68
+ azure_monitor_connection_string="InstrumentationKey=...;IngestionEndpoint=...",
69
+ )
70
+ ```
71
+
72
+ ### Available Configuration Options
73
+
74
+ | Keyword argument | Type | Default | Description |
75
+ |---|---|---|---|
76
+ | `enable_azure_monitor` | `bool` | `True` | Enable Azure Monitor export. |
77
+ | `azure_monitor_connection_string` | `str` | `None` | Connection string for Application Insights. Also read from `APPLICATIONINSIGHTS_CONNECTION_STRING` env var. |
78
+ | `azure_monitor_exporter_credential` | `TokenCredential` | `None` | Azure AD token credential for authentication. |
79
+ | `azure_monitor_enable_live_metrics` | `bool` | `True` | Enable live metrics collection. |
80
+ | `azure_monitor_enable_performance_counters` | `bool` | `True` | Enable performance counter collection. |
81
+ | `azure_monitor_exporter_disable_offline_storage` | `bool` | `False` | Disable offline retry storage for failed telemetry. |
82
+ | `azure_monitor_exporter_storage_directory` | `str` | `None` | Custom directory for offline telemetry storage. |
83
+ | `azure_monitor_browser_sdk_loader_config` | `dict` | `None` | Browser SDK loader configuration. |
84
+ | `disable_logging` | `bool` | `False` | Disable the logging pipeline. |
85
+ | `disable_tracing` | `bool` | `False` | Disable the tracing pipeline. |
86
+ | `disable_metrics` | `bool` | `False` | Disable the metrics pipeline. |
87
+ | `resource` | `Resource` | auto | OpenTelemetry Resource. |
88
+ | `span_processors` | `list` | `[]` | Additional span processors. |
89
+ | `log_record_processors` | `list` | `[]` | Additional log record processors. |
90
+ | `metric_readers` | `list` | `[]` | Additional metric readers. |
91
+ | `views` | `list` | `[]` | Metric views. |
92
+ | `logger_name` | `str` | `None` | Logger name for log collection. |
93
+ | `logging_formatter` | `Formatter` | `None` | Formatter for collected logs. |
94
+ | `instrumentation_options` | `dict` | `None` | Per-library instrumentation enable/disable options. |
95
+ | `enable_trace_based_sampling_for_logs` | `bool` | `False` | Enable trace-based sampling for logs. |
96
+
97
+ ### Sampling Configuration
98
+
99
+ Sampling is configured via standard OpenTelemetry environment variables:
100
+
101
+ | Environment variable | Description |
102
+ |---|---|
103
+ | `OTEL_TRACES_SAMPLER` | Sampler type to use (see supported values below). |
104
+ | `OTEL_TRACES_SAMPLER_ARG` | Argument for the sampler (e.g. sample ratio or traces per second). |
105
+
106
+ **Supported sampler values for `OTEL_TRACES_SAMPLER`:**
107
+
108
+ | Value | Description |
109
+ |---|---|
110
+ | `always_on` | Sample every trace. |
111
+ | `always_off` | Drop every trace. |
112
+ | `trace_id_ratio` | Sample a fixed percentage based on trace ID. Set ratio with `OTEL_TRACES_SAMPLER_ARG` (0–1). |
113
+ | `parentbased_always_on` | Parent-based, defaults to always on. |
114
+ | `parentbased_always_off` | Parent-based, defaults to always off. |
115
+ | `parentbased_trace_id_ratio` | Parent-based with trace ID ratio fallback. |
116
+ | `microsoft.fixed_percentage` | Azure Monitor fixed-percentage sampler. Set ratio with `OTEL_TRACES_SAMPLER_ARG` (0–1). |
117
+ | `microsoft.rate_limited` | Azure Monitor rate-limited sampler. Set target with `OTEL_TRACES_SAMPLER_ARG` (traces per second, default 5). |
118
+
119
+ **Example:**
120
+
121
+ ```bash
122
+ export OTEL_TRACES_SAMPLER=trace_id_ratio
123
+ export OTEL_TRACES_SAMPLER_ARG=0.1
124
+ ```
125
+
126
+ ## Planned Scope
127
+
128
+ - Azure Monitor exporter support
129
+ - OTLP exporter support
130
+ - Microsoft-specific agent observability extensions
131
+ - GenAI instrumentation toggles for OpenAI, OpenAI Agents, and LangChain
132
+ - Standard Python web and HTTP instrumentations
133
+ - Environment-variable driven configuration
134
+ - A stable package surface for downstream agent applications
135
+
136
+ ## Reference POC Highlights
137
+
138
+ The source POC positions the distro around three outcomes:
139
+
140
+ - one package, one API, one documentation surface
141
+ - less duplicated exporter and instrumentation wiring across teams
142
+ - much less application boilerplate compared with manual OpenTelemetry setup
143
+
144
+ The POC also describes this execution model:
145
+
146
+ 1. Configure Azure Monitor when enabled
147
+ 2. Otherwise create standalone OpenTelemetry providers
148
+ 3. Attach OTLP exporters when requested
149
+ 4. Attach Microsoft-specific exporters when requested
150
+ 5. Enable standard instrumentations
151
+ 6. Enable Microsoft-specific observability instrumentations
152
+ 7. Enable GenAI contrib instrumentations
153
+
154
+ ## Development
155
+
156
+ Create an environment and install the project with test dependencies:
157
+
158
+ ```bash
159
+ pip install -e .[test]
160
+ pytest
161
+ ```
162
+
163
+ ## Reference
164
+
165
+ - POC repo: https://github.com/azure-data/microsoft-opentelemetry-distro-poc
166
+ - Planning document: [PLANNING.md](./PLANNING.md)
167
+
168
+ ## Contributing
169
+
170
+ Read our [contributing guide](./CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to this distribution.
171
+
172
+ ## Data Collection
173
+
174
+ As this SDK is designed to enable applications to perform data collection which is sent to the Microsoft collection endpoints the following is required to identify our privacy statement.
175
+
176
+ The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
177
+
178
+ ## Trademarks
179
+
180
+ This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft’s Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
181
+
182
+ ## License
183
+
184
+ [MIT](LICENSE)
@@ -0,0 +1,141 @@
1
+ # microsoft-opentelemetry
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/microsoft-opentelemetry)](https://pypi.org/project/microsoft-opentelemetry/)
4
+
5
+ ## Repository Setup
6
+
7
+ The GitHub repository was provisioned with an onboarding placeholder that indicates repository setup and access control configuration may still need to be completed in the onboarding portal.
8
+
9
+ Until that setup is complete, some repository settings or access-management actions may remain restricted.
10
+
11
+ Python package for a Microsoft OpenTelemetry distribution that provides a single onboarding experience for observability across Azure Monitor, OTLP-compatible backends, and Microsoft Agent 365 style integrations.
12
+
13
+ This repository starts from the POC described in `azure-data/microsoft-opentelemetry-distro-poc`, but is intentionally kept minimal while the package shape and delivery plan are being defined.
14
+
15
+ ## Goal
16
+
17
+ The target package should reduce fragmented setup across multiple observability stacks to one import and one configuration function.
18
+
19
+ Intended API shape:
20
+
21
+ ```python
22
+ from microsoft.opentelemetry import use_microsoft_opentelemetry
23
+
24
+ use_microsoft_opentelemetry(
25
+ azure_monitor_connection_string="InstrumentationKey=...;IngestionEndpoint=...",
26
+ )
27
+ ```
28
+
29
+ ### Available Configuration Options
30
+
31
+ | Keyword argument | Type | Default | Description |
32
+ |---|---|---|---|
33
+ | `enable_azure_monitor` | `bool` | `True` | Enable Azure Monitor export. |
34
+ | `azure_monitor_connection_string` | `str` | `None` | Connection string for Application Insights. Also read from `APPLICATIONINSIGHTS_CONNECTION_STRING` env var. |
35
+ | `azure_monitor_exporter_credential` | `TokenCredential` | `None` | Azure AD token credential for authentication. |
36
+ | `azure_monitor_enable_live_metrics` | `bool` | `True` | Enable live metrics collection. |
37
+ | `azure_monitor_enable_performance_counters` | `bool` | `True` | Enable performance counter collection. |
38
+ | `azure_monitor_exporter_disable_offline_storage` | `bool` | `False` | Disable offline retry storage for failed telemetry. |
39
+ | `azure_monitor_exporter_storage_directory` | `str` | `None` | Custom directory for offline telemetry storage. |
40
+ | `azure_monitor_browser_sdk_loader_config` | `dict` | `None` | Browser SDK loader configuration. |
41
+ | `disable_logging` | `bool` | `False` | Disable the logging pipeline. |
42
+ | `disable_tracing` | `bool` | `False` | Disable the tracing pipeline. |
43
+ | `disable_metrics` | `bool` | `False` | Disable the metrics pipeline. |
44
+ | `resource` | `Resource` | auto | OpenTelemetry Resource. |
45
+ | `span_processors` | `list` | `[]` | Additional span processors. |
46
+ | `log_record_processors` | `list` | `[]` | Additional log record processors. |
47
+ | `metric_readers` | `list` | `[]` | Additional metric readers. |
48
+ | `views` | `list` | `[]` | Metric views. |
49
+ | `logger_name` | `str` | `None` | Logger name for log collection. |
50
+ | `logging_formatter` | `Formatter` | `None` | Formatter for collected logs. |
51
+ | `instrumentation_options` | `dict` | `None` | Per-library instrumentation enable/disable options. |
52
+ | `enable_trace_based_sampling_for_logs` | `bool` | `False` | Enable trace-based sampling for logs. |
53
+
54
+ ### Sampling Configuration
55
+
56
+ Sampling is configured via standard OpenTelemetry environment variables:
57
+
58
+ | Environment variable | Description |
59
+ |---|---|
60
+ | `OTEL_TRACES_SAMPLER` | Sampler type to use (see supported values below). |
61
+ | `OTEL_TRACES_SAMPLER_ARG` | Argument for the sampler (e.g. sample ratio or traces per second). |
62
+
63
+ **Supported sampler values for `OTEL_TRACES_SAMPLER`:**
64
+
65
+ | Value | Description |
66
+ |---|---|
67
+ | `always_on` | Sample every trace. |
68
+ | `always_off` | Drop every trace. |
69
+ | `trace_id_ratio` | Sample a fixed percentage based on trace ID. Set ratio with `OTEL_TRACES_SAMPLER_ARG` (0–1). |
70
+ | `parentbased_always_on` | Parent-based, defaults to always on. |
71
+ | `parentbased_always_off` | Parent-based, defaults to always off. |
72
+ | `parentbased_trace_id_ratio` | Parent-based with trace ID ratio fallback. |
73
+ | `microsoft.fixed_percentage` | Azure Monitor fixed-percentage sampler. Set ratio with `OTEL_TRACES_SAMPLER_ARG` (0–1). |
74
+ | `microsoft.rate_limited` | Azure Monitor rate-limited sampler. Set target with `OTEL_TRACES_SAMPLER_ARG` (traces per second, default 5). |
75
+
76
+ **Example:**
77
+
78
+ ```bash
79
+ export OTEL_TRACES_SAMPLER=trace_id_ratio
80
+ export OTEL_TRACES_SAMPLER_ARG=0.1
81
+ ```
82
+
83
+ ## Planned Scope
84
+
85
+ - Azure Monitor exporter support
86
+ - OTLP exporter support
87
+ - Microsoft-specific agent observability extensions
88
+ - GenAI instrumentation toggles for OpenAI, OpenAI Agents, and LangChain
89
+ - Standard Python web and HTTP instrumentations
90
+ - Environment-variable driven configuration
91
+ - A stable package surface for downstream agent applications
92
+
93
+ ## Reference POC Highlights
94
+
95
+ The source POC positions the distro around three outcomes:
96
+
97
+ - one package, one API, one documentation surface
98
+ - less duplicated exporter and instrumentation wiring across teams
99
+ - much less application boilerplate compared with manual OpenTelemetry setup
100
+
101
+ The POC also describes this execution model:
102
+
103
+ 1. Configure Azure Monitor when enabled
104
+ 2. Otherwise create standalone OpenTelemetry providers
105
+ 3. Attach OTLP exporters when requested
106
+ 4. Attach Microsoft-specific exporters when requested
107
+ 5. Enable standard instrumentations
108
+ 6. Enable Microsoft-specific observability instrumentations
109
+ 7. Enable GenAI contrib instrumentations
110
+
111
+ ## Development
112
+
113
+ Create an environment and install the project with test dependencies:
114
+
115
+ ```bash
116
+ pip install -e .[test]
117
+ pytest
118
+ ```
119
+
120
+ ## Reference
121
+
122
+ - POC repo: https://github.com/azure-data/microsoft-opentelemetry-distro-poc
123
+ - Planning document: [PLANNING.md](./PLANNING.md)
124
+
125
+ ## Contributing
126
+
127
+ Read our [contributing guide](./CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to this distribution.
128
+
129
+ ## Data Collection
130
+
131
+ As this SDK is designed to enable applications to perform data collection which is sent to the Microsoft collection endpoints the following is required to identify our privacy statement.
132
+
133
+ The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
134
+
135
+ ## Trademarks
136
+
137
+ This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft’s Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
138
+
139
+ ## License
140
+
141
+ [MIT](LICENSE)
@@ -0,0 +1,102 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "microsoft-opentelemetry"
7
+ version = "0.1.0a1"
8
+ description = "Minimal template for the Microsoft OpenTelemetry distro for Python"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ dependencies = [
12
+ "azure-core<2.0.0,>=1.28.0",
13
+ "azure-core-tracing-opentelemetry~=1.0.0b11",
14
+ "azure-monitor-opentelemetry-exporter~=1.0.0b49",
15
+ "opentelemetry-sdk==1.40",
16
+ "opentelemetry-api==1.40",
17
+ "opentelemetry-exporter-otlp-proto-http==1.40",
18
+ "opentelemetry-instrumentation==0.61b0",
19
+ "opentelemetry-instrumentation-django==0.61b0",
20
+ "opentelemetry-instrumentation-fastapi==0.61b0",
21
+ "opentelemetry-instrumentation-flask==0.61b0",
22
+ "opentelemetry-instrumentation-psycopg2==0.61b0",
23
+ "opentelemetry-instrumentation-requests==0.61b0",
24
+ "opentelemetry-instrumentation-urllib==0.61b0",
25
+ "opentelemetry-instrumentation-urllib3==0.61b0",
26
+ "opentelemetry-instrumentation-logging==0.61b0",
27
+ "opentelemetry.exporter.otlp.proto.grpc==1.40",
28
+ "opentelemetry-resource-detector-azure<1.0.0,>=0.1.5",
29
+ "langchain-core>=0.2.0",
30
+ "wrapt>=1.0",
31
+ "opentelemetry-util-genai>=0.3b0",
32
+ "microsoft-agents-activity>=0.9.0",
33
+ "microsoft-agents-hosting-core>=0.9.0",
34
+ "aiohttp>=3.8.0"
35
+ ]
36
+
37
+ [project.optional-dependencies]
38
+ test = [
39
+ "pytest>=8.0",
40
+ "pytest-cov>=5.0",
41
+ ]
42
+ dev = [
43
+ "black>=24.0",
44
+ "pylint>=3.3",
45
+ "mypy>=1.10",
46
+ "pyright>=1.1",
47
+ "pytest>=8.0",
48
+ "pytest-cov>=5.0",
49
+ ]
50
+
51
+ [project.entry-points.opentelemetry_instrumentor]
52
+ langchain = "microsoft.genai._langchain._tracer_instrumentor:LangChainInstrumentor"
53
+
54
+ [tool.setuptools]
55
+ package-dir = {"" = "src"}
56
+
57
+ [tool.setuptools.packages.find]
58
+ where = ["src"]
59
+ namespaces = true
60
+
61
+ [tool.black]
62
+ line-length = 120
63
+ target-version = ["py310"]
64
+
65
+ [tool.pylint.main]
66
+ py-version = "3.10"
67
+
68
+ [tool.pylint.format]
69
+ max-line-length = 120
70
+
71
+ [tool.coverage.run]
72
+ source = ["microsoft"]
73
+
74
+ [tool.coverage.report]
75
+ show_missing = true
76
+
77
+ [tool.pylint.messages_control]
78
+ disable = [
79
+ "missing-function-docstring",
80
+ "missing-module-docstring",
81
+ "missing-class-docstring",
82
+ "import-outside-toplevel",
83
+ "import-error",
84
+ "no-name-in-module",
85
+ "duplicate-code",
86
+ "too-few-public-methods",
87
+ "too-many-arguments",
88
+ "too-many-positional-arguments",
89
+ "too-many-locals",
90
+ "wrong-import-order",
91
+ "ungrouped-imports",
92
+ "unknown-option-value",
93
+ "fixme",
94
+ "invalid-name",
95
+ "unused-argument",
96
+ "protected-access",
97
+ "too-many-lines",
98
+ "too-many-public-methods",
99
+ ]
100
+
101
+ [tool.pytest.ini_options]
102
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -0,0 +1,19 @@
1
+ # -------------------------------------------------------------------------
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for
4
+ # license information.
5
+ # --------------------------------------------------------------------------
6
+
7
+ """Agent365 exporter integration for the Microsoft OpenTelemetry Distro."""
8
+
9
+ from microsoft.agents.a365.observability.core.exporters.utils import ( # noqa: F401
10
+ A365Handlers,
11
+ create_a365_components,
12
+ is_a365_enabled,
13
+ )
14
+
15
+ __all__ = [
16
+ "A365Handlers",
17
+ "create_a365_components",
18
+ "is_a365_enabled",
19
+ ]
@@ -0,0 +1,133 @@
1
+ # -------------------------------------------------------------------------
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for
4
+ # license information.
5
+ # --------------------------------------------------------------------------
6
+
7
+ """Constants for Agent365 observability.
8
+
9
+ Superset of microsoft-agents-a365-observability-core constants plus
10
+ distro-specific environment variable constants.
11
+ """
12
+
13
+ # --- Span operation names ---
14
+ INVOKE_AGENT_OPERATION_NAME = "invoke_agent"
15
+ EXECUTE_TOOL_OPERATION_NAME = "execute_tool"
16
+ OUTPUT_MESSAGES_OPERATION_NAME = "output_messages"
17
+ CHAT_OPERATION_NAME = "chat"
18
+
19
+ # --- OpenTelemetry semantic conventions ---
20
+ ERROR_TYPE_KEY = "error.type"
21
+ ERROR_MESSAGE_KEY = "error.message"
22
+ AZ_NAMESPACE_KEY = "az.namespace"
23
+ AZURE_RP_NAMESPACE_VALUE = "Microsoft.CognitiveServices"
24
+ SOURCE_NAME = "Agent365Sdk"
25
+
26
+ # --- Feature switches ---
27
+ ENABLE_OPENTELEMETRY_SWITCH = "Azure.Experimental.EnableActivitySource"
28
+ TRACE_CONTENTS_SWITCH = "Azure.Experimental.TraceGenAIMessageContent"
29
+ TRACE_CONTENTS_ENVIRONMENT_VARIABLE = "AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED"
30
+ ENABLE_OBSERVABILITY = "ENABLE_OBSERVABILITY"
31
+ ENABLE_A365_OBSERVABILITY = "ENABLE_A365_OBSERVABILITY"
32
+
33
+ # --- GenAI semantic conventions ---
34
+ GEN_AI_CLIENT_OPERATION_DURATION_METRIC_NAME = "gen_ai.client.operation.duration"
35
+ GEN_AI_CLIENT_TOKEN_USAGE_METRIC_NAME = "gen_ai.client.token.usage"
36
+ GEN_AI_OPERATION_NAME_KEY = "gen_ai.operation.name"
37
+ GEN_AI_REQUEST_MAX_TOKENS_KEY = "gen_ai.request.max_tokens"
38
+ GEN_AI_REQUEST_MODEL_KEY = "gen_ai.request.model"
39
+ GEN_AI_REQUEST_TEMPERATURE_KEY = "gen_ai.request.temperature"
40
+ GEN_AI_REQUEST_TOP_P_KEY = "gen_ai.request.top_p"
41
+ GEN_AI_RESPONSE_FINISH_REASONS_KEY = "gen_ai.response.finish_reasons"
42
+ GEN_AI_RESPONSE_MODEL_KEY = "gen_ai.response.model"
43
+ GEN_AI_RESPONSE_ID_KEY = "gen_ai.response.id"
44
+ GEN_AI_AGENT_ID_KEY = "gen_ai.agent.id"
45
+ GEN_AI_AGENT_NAME_KEY = "gen_ai.agent.name"
46
+ GEN_AI_AGENT_DESCRIPTION_KEY = "gen_ai.agent.description"
47
+ GEN_AI_AGENT_VERSION_KEY = "gen_ai.agent.version"
48
+ GEN_AI_AGENT_PLATFORM_ID_KEY = "microsoft.a365.agent.platform.id"
49
+ GEN_AI_AGENT_THOUGHT_PROCESS_KEY = "microsoft.a365.agent.thought.process"
50
+ GEN_AI_CONVERSATION_ID_KEY = "gen_ai.conversation.id"
51
+ GEN_AI_CONVERSATION_ITEM_LINK_KEY = "microsoft.conversation.item.link"
52
+ GEN_AI_TOKEN_TYPE_KEY = "gen_ai.token.type"
53
+ GEN_AI_USAGE_INPUT_TOKENS_KEY = "gen_ai.usage.input_tokens"
54
+ GEN_AI_USAGE_OUTPUT_TOKENS_KEY = "gen_ai.usage.output_tokens"
55
+ GEN_AI_CHOICE = "gen_ai.choice"
56
+ GEN_AI_PROVIDER_NAME_KEY = "gen_ai.provider.name"
57
+ GEN_AI_SYSTEM_INSTRUCTIONS_KEY = "gen_ai.system_instructions"
58
+ GEN_AI_INPUT_MESSAGES_KEY = "gen_ai.input.messages"
59
+ GEN_AI_OUTPUT_MESSAGES_KEY = "gen_ai.output.messages"
60
+
61
+ # --- Tool execution ---
62
+ GEN_AI_TOOL_CALL_ID_KEY = "gen_ai.tool.call.id"
63
+ GEN_AI_TOOL_NAME_KEY = "gen_ai.tool.name"
64
+ GEN_AI_TOOL_DESCRIPTION_KEY = "gen_ai.tool.description"
65
+ GEN_AI_TOOL_ARGS_KEY = "gen_ai.tool.call.arguments"
66
+ GEN_AI_TOOL_CALL_RESULT_KEY = "gen_ai.tool.call.result"
67
+ GEN_AI_TOOL_TYPE_KEY = "gen_ai.tool.type"
68
+
69
+ # --- Human caller ---
70
+ USER_ID_KEY = "user.id"
71
+ USER_NAME_KEY = "user.name"
72
+ USER_EMAIL_KEY = "user.email"
73
+ GEN_AI_CALLER_CLIENT_IP_KEY = "client.address"
74
+
75
+ # --- Agent-to-Agent caller ---
76
+ GEN_AI_CALLER_AGENT_USER_ID_KEY = "microsoft.a365.caller.agent.user.id"
77
+ GEN_AI_CALLER_AGENT_EMAIL_KEY = "microsoft.a365.caller.agent.user.email"
78
+ GEN_AI_CALLER_AGENT_NAME_KEY = "microsoft.a365.caller.agent.name"
79
+ GEN_AI_CALLER_AGENT_ID_KEY = "microsoft.a365.caller.agent.id"
80
+ GEN_AI_CALLER_AGENT_APPLICATION_ID_KEY = "microsoft.a365.caller.agent.blueprint.id"
81
+ GEN_AI_CALLER_AGENT_PLATFORM_ID_KEY = "microsoft.a365.caller.agent.platform.id"
82
+ GEN_AI_CALLER_AGENT_VERSION_KEY = "microsoft.a365.caller.agent.version"
83
+
84
+ # --- Agent-specific dimensions ---
85
+ AGENT_ID_KEY = "gen_ai.agent.id"
86
+ GEN_AI_TASK_ID_KEY = "gen_ai.task.id"
87
+ GEN_AI_ICON_URI_KEY = "gen_ai.agent365.icon_uri"
88
+ GEN_AI_EXECUTION_PAYLOAD_KEY = "gen_ai.execution.payload"
89
+ TENANT_ID_KEY = "microsoft.tenant.id"
90
+ GEN_AI_AGENT_AUID_KEY = "microsoft.agent.user.id"
91
+ GEN_AI_AGENT_EMAIL_KEY = "microsoft.agent.user.email"
92
+ GEN_AI_AGENT_BLUEPRINT_ID_KEY = "microsoft.a365.agent.blueprint.id"
93
+ SESSION_ID_KEY = "microsoft.session.id"
94
+ SESSION_DESCRIPTION_KEY = "microsoft.session.description"
95
+
96
+ # --- Error type constants ---
97
+ ERROR_TYPE_CANCELLED = "TaskCanceledException"
98
+
99
+ # --- OTel standard keys ---
100
+ SERVER_ADDRESS_KEY = "server.address"
101
+ SERVER_PORT_KEY = "server.port"
102
+ SERVICE_NAME_KEY = "service.name"
103
+
104
+ # --- Custom span keys ---
105
+ CUSTOM_PARENT_SPAN_ID_KEY = "custom.parent.span.id"
106
+ CUSTOM_SPAN_NAME_KEY = "custom.span.name"
107
+
108
+ # --- Channel ---
109
+ CHANNEL_NAME_KEY = "microsoft.channel.name"
110
+ CHANNEL_LINK_KEY = "microsoft.channel.link"
111
+
112
+ # --- Telemetry SDK attributes ---
113
+ TELEMETRY_SDK_NAME_KEY = "telemetry.sdk.name"
114
+ TELEMETRY_SDK_LANGUAGE_KEY = "telemetry.sdk.language"
115
+ TELEMETRY_SDK_VERSION_KEY = "telemetry.sdk.version"
116
+ TELEMETRY_SDK_NAME_VALUE = "A365ObservabilitySDK"
117
+ TELEMETRY_SDK_LANGUAGE_VALUE = "python"
118
+
119
+ # --- Distro environment variable names ---
120
+ ENABLE_A365_OBSERVABILITY_EXPORTER = "ENABLE_A365_OBSERVABILITY_EXPORTER"
121
+ A365_OBSERVABILITY_DOMAIN_OVERRIDE = "A365_OBSERVABILITY_DOMAIN_OVERRIDE"
122
+ A365_TENANT_ID_ENV = "A365_TENANT_ID"
123
+ A365_AGENT_ID_ENV = "A365_AGENT_ID"
124
+ A365_CLUSTER_CATEGORY_ENV = "A365_CLUSTER_CATEGORY"
125
+ A365_USE_S2S_ENDPOINT_ENV = "A365_USE_S2S_ENDPOINT"
126
+ A365_SUPPRESS_INVOKE_AGENT_INPUT_ENV = "A365_SUPPRESS_INVOKE_AGENT_INPUT"
127
+
128
+ # --- FIC (Federated Identity Credential) token flow env vars ---
129
+ A365_AGENT_APP_INSTANCE_ID_ENV = "A365_AGENT_APP_INSTANCE_ID"
130
+ A365_AGENTIC_USER_ID_ENV = "A365_AGENTIC_USER_ID"
131
+ A365_SERVICE_CLIENT_ID_ENV = "CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID"
132
+ A365_SERVICE_CLIENT_SECRET_ENV = "CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET"
133
+ A365_SERVICE_TENANT_ID_ENV = "CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID"