-
Notifications
You must be signed in to change notification settings - Fork 202
Propagate tags from worker to host #3303
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
satvu
wants to merge
23
commits into
main
Choose a base branch
from
satvu/otel-worker-tags
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
dada03e
works e2e
satvu 9e63c74
fix dictionary conversion
satvu 8869077
Update src/DotNetWorker.Grpc/Handlers/InvocationHandler.cs
satvu 5bdd4d4
Update src/DotNetWorker.Core/FunctionsApplication.cs
satvu fc42c21
Update src/DotNetWorker.Grpc/Handlers/InvocationHandler.cs
satvu 529f7b8
resolve comments, improve perf
satvu 9c5967d
add test, cleanup
satvu 2ab466e
fix tests
satvu d67ddc5
one more null check
satvu d6f8387
update protobuf message
satvu b5b5075
update tests
satvu 6d45a58
initial release notes template
satvu 9eddfe6
Updated subtree from https://github.com/azure/azure-functions-languag…
satvu 0c8550a
Updated subtree from https://github.com/azure/azure-functions-languag…
satvu 828efb0
update csharp namespace
satvu af605fb
revert bad proto-merge changes
satvu 2047f1c
rm bad proto merge file
satvu 18e8fc2
rm extrafiles
satvu 8711881
use tags directly
satvu 7ac7d52
rm log
satvu c47f4f9
resolve comments
satvu 4f369ff
cleanup
satvu 00fb6d4
add tests, resolve comments
satvu 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
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
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
test/DotNetWorker.Tests/OpenTelemetryTraceConstantsTests.cs
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) .NET Foundation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
|
||
| using System; | ||
| using System.Linq; | ||
| using System.Reflection; | ||
| using Microsoft.Azure.Functions.Worker.Diagnostics; | ||
| using Xunit; | ||
|
|
||
| namespace Microsoft.Azure.Functions.Worker.Tests; | ||
|
|
||
| public class OpenTelemetryTraceConstantsTests | ||
| { | ||
| [Theory] | ||
| [InlineData(typeof(TraceConstants.OTelAttributes_1_17_0))] | ||
| [InlineData(typeof(TraceConstants.OTelAttributes_1_37_0))] | ||
| [InlineData(typeof(TraceConstants.InternalKeys))] | ||
| public void All_Field_Contains_All_Public_Constants(Type classType) | ||
| { | ||
| // Get all public const string fields (excluding the "All" field itself) | ||
| var publicConstants = classType | ||
| .GetFields(BindingFlags.Public | BindingFlags.Static) | ||
| .Where(f => f.IsLiteral && !f.IsInitOnly && f.FieldType == typeof(string) && f.Name != "All") | ||
| .Select(f => f.GetValue(null) as string) | ||
| .Where(v => v != null) | ||
| .OrderBy(v => v) | ||
| .ToArray(); | ||
|
|
||
| // Get the "All" field | ||
| var allField = classType.GetField("All", BindingFlags.NonPublic | BindingFlags.Static); | ||
| Assert.NotNull(allField); | ||
|
|
||
| var allValues = (allField.GetValue(null) as string[])?.OrderBy(v => v).ToArray(); | ||
| Assert.NotNull(allValues); | ||
|
|
||
| // Verify that "All" contains exactly the same values as all public constants | ||
| Assert.Equal(publicConstants, allValues); | ||
| } | ||
| } |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes can't be merged/released until the host changes are out. Putting in placeholders for now for the release notes.