Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
96776c2
gencode
l0lawrence Jan 29, 2026
e25f505
delete
l0lawrence Jan 29, 2026
71b9fd4
update model imports
l0lawrence Jan 29, 2026
5ef636a
easier diff for rn
l0lawrence Jan 29, 2026
71b7dd0
fix gen->reg code issues -- some Qs HERE
l0lawrence Jan 29, 2026
5d9c979
double base_url
l0lawrence Jan 29, 2026
2a9e534
missing imports here
l0lawrence Jan 29, 2026
a4f0e6e
serialize -- need to look at
l0lawrence Jan 29, 2026
f67586a
update (#44921)
iscai-msft Jan 29, 2026
56b4dc1
do wrap the client its easier
l0lawrence Jan 29, 2026
820fde4
regen w/client.tsp changes
l0lawrence Jan 29, 2026
160ad13
Update version (#44927)
azure-sdk Jan 30, 2026
7be5b42
needed _data attribute **look into
l0lawrence Jan 30, 2026
4823585
Update sample_redteam_evaluations.py to use OS temp folder for output…
dargilco Jan 30, 2026
916e8a7
bump typespec-python 0.59.2 (#44934)
ChenxiJiang333 Jan 30, 2026
519173c
Enable live metrics be default (#44902)
rads-1996 Jan 30, 2026
9c4f288
patch updates
l0lawrence Jan 30, 2026
fd41663
param models now splatted -- using TypedDicts
l0lawrence Jan 30, 2026
67a31ae
ai helping to fix the etag/matchcondition mismatch
l0lawrence Jan 30, 2026
894bcbc
Merge branch 'main' into storageblob_under
l0lawrence Jan 30, 2026
10ed89a
regen with xml deserialization
l0lawrence Jan 30, 2026
b719ed9
temp remove & x-msmm-paths to get operations to work
l0lawrence Jan 30, 2026
9160a0a
more options
l0lawrence Jan 30, 2026
132e6f5
signedIdentifiers and more {} splatting
l0lawrence Jan 30, 2026
e0025ed
mising kwarg
l0lawrence Jan 30, 2026
447e247
enum xml deserialize
l0lawrence Jan 30, 2026
8b278e3
surprised this didnt fail before?
l0lawrence Jan 30, 2026
4d6185e
more models
l0lawrence Jan 30, 2026
b7ab80a
EMITTER ISSUE
l0lawrence Jan 30, 2026
9985f8d
copilot fixin more stuff
l0lawrence Feb 2, 2026
6340d30
regen with alttype
l0lawrence Feb 2, 2026
be664c9
model init
l0lawrence Feb 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/event-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: >
dotnet tool install
Azure.Sdk.Tools.GitHubEventProcessor
--version 1.0.0-dev.20250314.4
--version 1.0.0-dev.20260129.1
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
--global
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-event-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: >
dotnet tool install
Azure.Sdk.Tools.GitHubEventProcessor
--version 1.0.0-dev.20250425.1
--version 1.0.0-dev.20260129.1
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
--global
shell: bash
Expand Down
62 changes: 31 additions & 31 deletions eng/emitter-package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-python": "0.59.0"
"@azure-tools/typespec-python": "0.59.2"
},
"devDependencies": {
"@typespec/compiler": "^1.8.0",
Expand All @@ -14,11 +14,11 @@
"@typespec/streams": "~0.78.0",
"@typespec/xml": "~0.78.0",
"@azure-tools/openai-typespec": "1.7.3",
"@azure-tools/typespec-autorest": "~0.64.0",
"@azure-tools/typespec-autorest": "~0.64.1",
"@azure-tools/typespec-azure-core": "~0.64.0",
"@azure-tools/typespec-azure-resource-manager": "~0.64.0",
"@azure-tools/typespec-azure-resource-manager": "~0.64.1",
"@azure-tools/typespec-azure-rulesets": "~0.64.0",
"@azure-tools/typespec-client-generator-core": "~0.64.4",
"@azure-tools/typespec-client-generator-core": "~0.64.5",
"@azure-tools/typespec-liftr-base": "0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
Set these environment variables with your own values:
1) AZURE_AI_PROJECT_ENDPOINT - Required. The Azure AI Project endpoint, as found in the overview page of your
Microsoft Foundry project. It has the form: https://<account_name>.services.ai.azure.com/api/projects/<project_name>.
2) DATA_FOLDER - Optional. The folder path where the data files for upload are located.
3) AZURE_AI_AGENT_NAME - Required. The name of the Agent to perform red teaming evaluation on.
2) AZURE_AI_AGENT_NAME - Required. The name of the Agent to perform red teaming evaluation on.
"""

import os

import tempfile
from dotenv import load_dotenv
from pprint import pprint
from azure.ai.projects.models._models import PromptAgentDefinition
Expand All @@ -49,10 +48,6 @@ def main() -> None:
endpoint = os.environ.get("AZURE_AI_PROJECT_ENDPOINT", "")
agent_name = os.environ.get("AZURE_AI_AGENT_NAME", "")

# Construct the paths to the data folder and data file used in this sample
script_dir = os.path.dirname(os.path.abspath(__file__))
data_folder = os.environ.get("DATA_FOLDER", os.path.join(script_dir, "data_folder"))

with (
DefaultAzureCredential() as credential,
AIProjectClient(endpoint=endpoint, credential=credential) as project_client,
Expand Down Expand Up @@ -99,9 +94,7 @@ def main() -> None:
)

taxonomy = project_client.evaluation_taxonomies.create(name=agent_name, body=eval_taxonomy_input)
taxonomy_path = os.path.join(data_folder, f"taxonomy_{agent_name}.json")
# Create the data folder if it doesn't exist
os.makedirs(data_folder, exist_ok=True)
taxonomy_path = os.path.join(tempfile.gettempdir(), f"taxonomy_{agent_name}.json")
with open(taxonomy_path, "w") as f:
f.write(json.dumps(_to_json_primitive(taxonomy), indent=2))
print(f"Red teaming Taxonomy created for agent: {agent_name}. Taxonomy written to {taxonomy_path}")
Expand Down Expand Up @@ -134,9 +127,7 @@ def main() -> None:
run = client.evals.runs.retrieve(run_id=eval_run_response.id, eval_id=eval_object.id)
if run.status == "completed" or run.status == "failed":
output_items = list(client.evals.runs.output_items.list(run_id=run.id, eval_id=eval_object.id))
output_items_path = os.path.join(data_folder, f"redteam_eval_output_items_{agent_name}.json")
# Create the data folder if it doesn't exist
os.makedirs(data_folder, exist_ok=True)
output_items_path = os.path.join(tempfile.gettempdir(), f"redteam_eval_output_items_{agent_name}.json")
with open(output_items_path, "w") as f:
f.write(json.dumps(_to_json_primitive(output_items), indent=2))
print(
Expand Down
3 changes: 3 additions & 0 deletions sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

### Features Added

- Enable live metrics by default
([#44902](https://github.com/Azure/azure-sdk-for-python/pull/44902))

### Breaking Changes

### Bugs Fixed
Expand Down
2 changes: 1 addition & 1 deletion sdk/monitor/azure-monitor-opentelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You can use `configure_azure_monitor` to set up instrumentation for your app to
| Parameter | Description | Environment Variable |
|-------------------|----------------------------------------------------|----------------------|
| `connection_string` | The [connection string][connection_string_doc] for your Application Insights resource. The connection string will be automatically populated from the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable if not explicitly passed in. | `APPLICATIONINSIGHTS_CONNECTION_STRING` |
| `enable_live_metrics` | Enable [live metrics][application_insights_live_metrics] feature. Defaults to `False`. | `N/A` |
| `enable_live_metrics` | Enable [live metrics][application_insights_live_metrics] feature. Defaults to `True`. | `N/A` |
| `enable_performance_counters` | Enable [performance counters][application_insights_performance_counters]. Defaults to `True`. | `N/A` |
| `logging_formatter` | A Python logging [formatter][python_logging_formatter] that will be used to format collected logs. | `PYTHON_APPLICATIONINSIGHTS_LOGGING_FORMAT` - accepts a STRING field used for formatting, not a [formatter][python_logging_formatter] |
| `logger_name` | The name of the [Python logger][python_logger] under which telemetry is collected. Setting this value is imperative so logs created from the SDK itself are not tracked. | `PYTHON_APPLICATIONINSIGHTS_LOGGER_NAME` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def configure_azure_monitor(**kwargs) -> None: # pylint: disable=C4758
:keyword list[~opentelemetry.sdk.metrics.MetricReader] metric_readers: List of MetricReader objects to read and
export metrics. Each reader can have its own exporter and collection interval.
:keyword bool enable_live_metrics: Boolean value to determine whether to enable live metrics feature.
Defaults to `False`.
Defaults to `True`.
:keyword bool enable_performance_counters: Boolean value to determine whether to enable performance counters.
Defaults to `True`.
:keyword str storage_directory: Storage directory in which to store retry files. Defaults to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def _default_metric_readers(configurations):


def _default_enable_live_metrics(configurations):
configurations.setdefault(ENABLE_LIVE_METRICS_ARG, False)
configurations.setdefault(ENABLE_LIVE_METRICS_ARG, True)


def _default_enable_performance_counters(configurations):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
# --------------------------------------------------------------------------

"""
This example shows how configure live metrics to be enabled. It sets up a minimal example of sending dependency,
This example sets up a minimal example of sending dependency through live metrics,
trace and exception telemetry to demonstrate the capabilities and collection set of live metrics.
Live metrics is enabled by default, it can be disabled by setting `enable_live_metrics` to `False`
"""
import logging
import requests # type: ignore[import-untyped]
import time

from azure.monitor.opentelemetry import configure_azure_monitor
from opentelemetry import trace

from opentelemetry.sdk.resources import Resource

configure_azure_monitor(
Expand All @@ -25,7 +25,7 @@
}
),
logger_name=__name__,
enable_live_metrics=True, # Enable live metrics configuration
# enable_live_metrics=False, # To disable live metrics configuration
)

tracer = trace.get_tracer(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_configure_azure_monitor(
tracing_mock.assert_called_once()
logging_mock.assert_called_once()
metrics_mock.assert_called_once()
live_metrics_mock.assert_not_called()
live_metrics_mock.assert_called_once()
instrumentation_mock.assert_called_once()
detect_attach_mock.assert_called_once()

Expand Down Expand Up @@ -109,7 +109,7 @@ def test_configure_azure_monitor_disable_tracing(
"django": {"enabled": False},
"requests": {"enabled": False},
},
"enable_live_metrics": False,
"enable_live_metrics": True,
"enable_performance_counters": True,
"resource": TEST_RESOURCE,
}
Expand All @@ -123,7 +123,7 @@ def test_configure_azure_monitor_disable_tracing(
tracing_mock.assert_not_called()
logging_mock.assert_called_once_with(configurations)
metrics_mock.assert_called_once_with(configurations)
live_metrics_mock.assert_not_called()
live_metrics_mock.assert_called_once_with(configurations)
instrumentation_mock.assert_called_once_with(configurations)
# Assert setup_metrics is called before setup_logging
self.assertLess(call_order.index("metrics"), call_order.index("logging"))
Expand Down Expand Up @@ -160,7 +160,7 @@ def test_configure_azure_monitor_disable_logging(
"disable_tracing": False,
"disable_logging": True,
"disable_metrics": False,
"enable_live_metrics": False,
"enable_live_metrics": True,
"enable_performance_counters": True,
"resource": TEST_RESOURCE,
}
Expand All @@ -174,7 +174,7 @@ def test_configure_azure_monitor_disable_logging(
tracing_mock.assert_called_once_with(configurations)
logging_mock.assert_not_called()
metrics_mock.assert_called_once_with(configurations)
live_metrics_mock.assert_not_called()
live_metrics_mock.assert_called_once_with(configurations)
instrumentation_mock.assert_called_once_with(configurations)
# Assert setup_metrics is called before setup_tracing
self.assertLess(call_order.index("metrics"), call_order.index("tracing"))
Expand Down Expand Up @@ -211,7 +211,7 @@ def test_configure_azure_monitor_disable_metrics(
"disable_tracing": False,
"disable_logging": False,
"disable_metrics": True,
"enable_live_metrics": False,
"enable_live_metrics": True,
"enable_performance_counters": True,
"resource": TEST_RESOURCE,
}
Expand All @@ -220,7 +220,7 @@ def test_configure_azure_monitor_disable_metrics(
tracing_mock.assert_called_once_with(configurations)
logging_mock.assert_called_once_with(configurations)
metrics_mock.assert_not_called()
live_metrics_mock.assert_not_called()
live_metrics_mock.assert_called_once_with(configurations)
instrumentation_mock.assert_called_once_with(configurations)

@patch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_get_configurations(self, resource_create_mock):
"enabled": False,
}
},
enable_live_metrics=True,
enable_live_metrics=False,
enable_performance_counters=False,
views=["test_view"],
logger_name="test_logger",
Expand Down Expand Up @@ -117,7 +117,7 @@ def test_get_configurations(self, resource_create_mock):
},
)
self.assertEqual(configurations["storage_directory"], "test_directory")
self.assertEqual(configurations["enable_live_metrics"], True)
self.assertEqual(configurations["enable_live_metrics"], False)
self.assertEqual(configurations["enable_performance_counters"], False)
self.assertEqual(configurations["views"], ["test_view"])
self.assertEqual(configurations["logger_name"], "test_logger")
Expand Down Expand Up @@ -154,7 +154,7 @@ def test_get_configurations_defaults(self, resource_create_mock):
self.assertEqual(configurations["sampling_ratio"], 1.0)
self.assertTrue("credential" not in configurations)
self.assertTrue("storage_directory" not in configurations)
self.assertEqual(configurations["enable_live_metrics"], False)
self.assertEqual(configurations["enable_live_metrics"], True)
self.assertEqual(configurations["enable_performance_counters"], True)
self.assertEqual(configurations["logger_name"], "")
self.assertEqual(configurations["span_processors"], [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
UserDelegationKey,
Services
)
from ._generated.models import RehydratePriority
from ._generated.azure.storage.blobs.models import RehydratePriority
from ._models import (
BlobType,
BlockState,
Expand Down
Loading