8000 [automated] Merge branch 'main' => 'dev' by github-actions[bot] · Pull Request #6267 · dotnet/extensions · GitHub
[go: up one dir, main page]

Skip to content

[automated] Merge branch 'main' => 'dev' #6267

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

Open
wants to merge 21 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7e7b3ee
Merged PR 48904: Flowing stable internal versions and get ready for 9…
joperezr Apr 2, 2025
3ae00de
Add TextReasoningContent (#6222)
stephentoub Apr 2, 2025
90a1bd8
Use ErrorContent in OpenAIResponseChatClient (#6231)
stephentoub Apr 2, 2025
a9aa283
OpenAI: Parse detail additional property (#6225)
jozkee Apr 2, 2025
4133f2e
In telemetry, treat AdditionalProperties as sensitive (#6239)
SteveSandersonMS Apr 3, 2025
f09ec8c
Use SHA384 and make key more explicit (#6237)
SteveSandersonMS Apr 3, 2025
ae724c1
Disable STJ default reflection and fix a number of failing tests. (#6…
eiriktsarpalis Apr 3, 2025
625ed7b
Merged PR 48946: Backport recent M.E.AI changes from main
stephentoub Apr 4, 2025
e7224fb
Merged PR 48958: Mark release builds as "stable"
RussKie Apr 4, 2025
0143a52
Add button to report to download dataset as JSON (#6243)
peterwald Apr 3, 2025
bc9ef7e
Merged PR 48969: Add button to report to download dataset as JSON (#6…
peterwald Apr 4, 2025
d4094cc
Merged PR 48970: [9.4] [cherry-picked from main] Introduce Content Sa…
Apr 4, 2025
f0bda61
Remove use of ConfigureAwait from Microsoft.Extensions.AI.dll for AIF…
stephentoub Apr 7, 2025
5cec925
Merged PR 49002: Remove use of ConfigureAwait from Microsoft.Extensio…
stephentoub Apr 7, 2025
667d70e
Merged PR 49004: [9.4] [cherry-pick] Only display tags from the lates…
Apr 7, 2025
65564a8
Merge Internal changes
joperezr Apr 8, 2025
398f7f6
[release/9.2] Merging internal changes (#6263)
joperezr Apr 8, 2025
80cb898
Merge changes from release/9.4 branch
joperezr Apr 8, 2025
06b7eba
Merging release/9.4 changes (#6264)
joperezr Apr 9, 2025
3ebeec1
Add logging buffering (#5635)
evgenyfedorov2 Apr 9, 2025
88349b0
Merge branch 'dev' into merge/main-to-dev
RussKie Apr 9, 2025
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
Prev Previous commit
Next Next commit
In telemetry, treat AdditionalProperties as sensitive (#6239)
  • Loading branch information
SteveSandersonMS au 8000 thored and stephentoub committed Apr 3, 2025
commit 4133f2e96a16bf42ed07773cfd36f146257ca0ef
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseA

if (_system is not null)
{
if (options.AdditionalProperties is { } props)
// Since AdditionalProperties has undefined meaning, we treat it as potentially sensitive data
if (EnableSensitiveData && options.AdditionalProperties is { } props)
{
// Log all additional request options as per-provider tags. This is non-normative, but it covers cases where
// there's a per-provider specification in a best-effort manner (e.g. gen_ai.openai.request.service_tier),
Expand Down Expand Up @@ -404,11 +405,12 @@ private void TraceResponse(

if (_system is not null)
{
// Log all additional response properties as per-provider tags. This is non-normative, but it covers cases where
// there's a per-provider specification in a best-effort manner (e.g. gen_ai.openai.response.system_fingerprint),
// and more generally cases where there's additional useful information to be logged.
8000 if (response.AdditionalProperties is { } props)
// Since AdditionalProperties has undefined meaning, we treat it as potentially sensitive data
if (EnableSensitiveData && response.AdditionalProperties is { } props)
{
// Log all additional response properties as per-provider tags. This is non-normative, but it covers cases where
// there's a per-provider specification in a best-effort manner (e.g. gen_ai.openai.response.system_fingerprint),
// and more generally cases where there's additional useful information to be logged.
foreach (KeyValuePair<string, object?> prop in props)
{
_ = activity.AddTag(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ async static IAsyncEnumerable<ChatResponseUpdate> CallbackAsync(
Assert.Equal(7, activity.GetTagItem("gen_ai.request.top_k"));
Assert.Equal(123, activity.GetTagItem("gen_ai.request.max_tokens"));
Assert.Equal("""["hello", "world"]""", activity.GetTagItem("gen_ai.request.stop_sequences"));
Assert.Equal("value1", activity.GetTagItem("gen_ai.testservice.request.service_tier"));
Assert.Equal("value2", activity.GetTagItem("gen_ai.testservice.request.something_else"));
Assert.Equal(enableSensitiveData ? "value1" : null, activity.GetTagItem("gen_ai.testservice.request.service_tier"));
Assert.Equal(enableSensitiveData ? "value2" : null, activity.GetTagItem("gen_ai.testservice.request.something_else"));
Assert.Equal(42L, activity.GetTagItem("gen_ai.request.seed"));

Assert.Equal("id123", activity.GetTagItem("gen_ai.response.id"));
Assert.Equal("""["stop"]""", activity.GetTagItem("gen_ai.response.finish_reasons"));
Assert.Equal(10, activity.GetTagItem("gen_ai.response.input_tokens"));
Assert.Equal(20, activity.GetTagItem("gen_ai.response.output_tokens"));
Assert.Equal("abcdefgh", activity.GetTagItem("gen_ai.testservice.response.system_fingerprint"));
Assert.Equal("value2", activity.GetTagItem("gen_ai.testservice.response.and_something_else"));
Assert.Equal(enableSensitiveData ? "abcdefgh" : null, activity.GetTagItem("gen_ai.testservice.response.system_fingerprint"));
Assert.Equal(enableSensitiveData ? "value2" : null, activity.GetTagItem("gen_ai.testservice.response.and_something_else"));

Assert.True(activity.Duration.TotalMilliseconds > 0);

Expand Down
0