-
Notifications
You must be signed in to change notification settings - Fork 10
feat(telemetry): add telemetry support for user agent parsing #90
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 7 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3d1abc6
feat(telemetry): add telemetry support for user agent parsing
BenjaminAbt 26636f1
feat(telemetry): add telemetry support and documentation
BenjaminAbt 770ece1
feat(telemetry): add native metrics support for user agent parser
BenjaminAbt 081727e
feat(telemetry): enhance metrics and telemetry documentation
BenjaminAbt 055ed40
feat(telemetry): enhance telemetry documentation and add meters support
BenjaminAbt 3ac5975
refactor(telemetry): simplify method signatures and improve readability
BenjaminAbt 44f030f
refactor(telemetry): remove DEBUG conditional compilation
BenjaminAbt 1e97351
refactor(telemetry): update metric naming conventions
BenjaminAbt 067b733
docs(copilot): add comprehensive instructions for Copilot usage
BenjaminAbt 0478999
refactor(telemetry): update duration metrics to seconds
BenjaminAbt e79daff
refactor(telemetry): standardize meter names and descriptions
BenjaminAbt 1a109d0
refactor(meters): simplify initialization logic in Enable method
BenjaminAbt 58bf7c5
refactor(tests): standardize meter names in telemetry tests
BenjaminAbt 6abf2bd
feat(telemetry): add fluent API for meter telemetry configuration
BenjaminAbt deb5cc7
feat(tests): enhance telemetry tests with EventCounter listener
BenjaminAbt d93adb6
feat(telemetry): ensure EventCounter logging is initialized
BenjaminAbt 9b3f2a6
feat(telemetry): initialize EventSource in Enable method
BenjaminAbt 462267a
feat(telemetry): ensure deterministic EventSource construction
BenjaminAbt 6a1e03b
feat(telemetry): refactor meter name generation logic
BenjaminAbt f658e00
docs(license): update copyright year to 2026
BenjaminAbt 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,84 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "dotnet: restore", | ||
| "type": "shell", | ||
| "command": "dotnet", | ||
| "args": [ | ||
| "restore" | ||
| ], | ||
| "problemMatcher": "$msCompile", | ||
| "presentation": { | ||
| "reveal": "silent", | ||
| "panel": "dedicated", | ||
| "close": true, | ||
| "showReuseMessage": false | ||
| } | ||
| }, | ||
| { | ||
| "label": "dotnet: build", | ||
| "type": "shell", | ||
| "command": "dotnet", | ||
| "args": [ | ||
| "build", | ||
| "--no-restore" | ||
| ], | ||
| "problemMatcher": "$msCompile", | ||
| "dependsOn": "dotnet: restore", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "dedicated", | ||
| "close": true, | ||
| "showReuseMessage": false | ||
| }, | ||
| "group": "build" | ||
| }, | ||
| { | ||
| "label": "dotnet: test", | ||
| "type": "shell", | ||
| "command": "dotnet", | ||
| "args": [ | ||
| "test", | ||
| "--no-build", | ||
| "--nologo" | ||
| ], | ||
| "problemMatcher": "$msCompile", | ||
| "dependsOn": "dotnet: build", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "dedicated", | ||
| "close": true, | ||
| "showReuseMessage": false | ||
| } | ||
| }, | ||
| { | ||
| "label": "test", | ||
| "type": "shell", | ||
| "command": "dotnet test --nologo", | ||
| "args": [], | ||
| "problemMatcher": [ | ||
| "$msCompile" | ||
| ], | ||
| "group": "build" | ||
| "isBackground": false | ||
| }, | ||
| { | ||
| "label": "test", | ||
| "type": "shell", | ||
| "command": "dotnet test --nologo", | ||
| "args": [], | ||
| "isBackground": false | ||
| }, | ||
| { | ||
| "label": "test", | ||
| "type": "shell", | ||
| "command": "dotnet test --nologo", | ||
| "args": [], | ||
| "isBackground": false | ||
| }, | ||
| { | ||
| "label": "test", | ||
| "type": "shell", | ||
| "command": "dotnet test --nologo", | ||
| "args": [], | ||
| "isBackground": false | ||
| } | ||
| ] | ||
| } |
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
34 changes: 34 additions & 0 deletions
34
...e/DependencyInjection/HttpUserAgentParserDependencyInjectionOptionsTelemetryExtensions.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,34 @@ | ||
| // Copyright © https://myCSharp.de - all rights reserved | ||
|
|
||
| using System.Diagnostics.Metrics; | ||
| using MyCSharp.HttpUserAgentParser.AspNetCore.Telemetry; | ||
| using MyCSharp.HttpUserAgentParser.DependencyInjection; | ||
|
|
||
| namespace MyCSharp.HttpUserAgentParser.AspNetCore.DependencyInjection; | ||
|
|
||
| /// <summary> | ||
| /// Fluent extensions to enable telemetry for the AspNetCore package. | ||
| /// </summary> | ||
| public static class HttpUserAgentParserDependencyInjectionOptionsTelemetryExtensions | ||
| { | ||
| /// <summary> | ||
| /// Enables EventCounter telemetry for the AspNetCore package. | ||
| /// </summary> | ||
| public static HttpUserAgentParserDependencyInjectionOptions WithAspNetCoreTelemetry( | ||
| this HttpUserAgentParserDependencyInjectionOptions options) | ||
| { | ||
| HttpUserAgentParserAspNetCoreTelemetry.Enable(); | ||
| return options; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Enables native System.Diagnostics.Metrics telemetry for the AspNetCore package. | ||
| /// </summary> | ||
| public static HttpUserAgentParserDependencyInjectionOptions WithAspNetCoreMeterTelemetry( | ||
| this HttpUserAgentParserDependencyInjectionOptions options, | ||
| Meter? meter = null) | ||
| { | ||
| HttpUserAgentParserAspNetCoreTelemetry.EnableMeters(meter); | ||
| return options; | ||
| } | ||
| } |
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
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.