-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: Provide dependency names for dependencies & requests #229
Conversation
✔️ Deploy Preview for arcus-observability canceled. 🔨 Explore the source changes: 4fb6cf0 🔍 Inspect the deploy log: https://app.netlify.com/sites/arcus-observability/deploys/614c94efd7e0a000071ad210 |
src/Arcus.Observability.Telemetry.Core/Extensions/ILoggerExtensions.cs
Outdated
Show resolved
Hide resolved
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.
If the PR is only for the request, can we remove the changes for the dependencies please?
...bservability.Telemetry.Serilog.Sinks.ApplicationInsights/Converters/CloudContextConverter.cs
Outdated
Show resolved
Hide resolved
If you keep the dependency changes, can you please use the convention from https://github.com/arcus-azure/arcus-service-to-service-correlation-poc/blob/d1526c963c04b35243d71a65f9eefd3eeba1dcee/src/Arcus.POC.Observability.Telemetry.Serilog.Sinks.ApplicationInsights/Extensions/ILoggerExtensions.cs#L118 for Service Bus? I didn't include the test but the goal is to align with the official SDK notation. |
…ights/Converters/CloudContextConverter.cs Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Thanks for the feedback! |
I'll have a look later, as I'm not allowed to work long for Arcus for more than a day in a week 😅, (shame). Thanks for your PR! Very much appreciated! 🙏🥇 |
We should have them indeed, but let's use a separate PR for that. |
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.
Looks like a good start, thank you!
I see two things we should do:
- Provide unit tests for dependencies
- Move the conversion to our
OperationContextConverter
...vability.Telemetry.Serilog.Sinks.ApplicationInsights/Converters/RequestTelemetryConverter.cs
Outdated
Show resolved
Hide resolved
src/Arcus.Observability.Telemetry.Core/Extensions/ILoggerExtensions.cs
Outdated
Show resolved
Hide resolved
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.
Great first step! You really have successfully found the necessary places to incorporate your requested changes. Like Tom said, we usually provide unit tests for every publicly available member (I'm sure you'll find the logging unit tests for requests).
- Provide unit tests for requests (and dependencies if you don't create a separate PR for them)
- Update the dependency integration tests to include the passed-along operation name
Let us know @pim-simons , if you need any help! You're doing a great job!
...vability.Telemetry.Serilog.Sinks.ApplicationInsights/Converters/RequestTelemetryConverter.cs
Outdated
Show resolved
Hide resolved
src/Arcus.Observability.Tests.Integration/Serilog/Sinks/ApplicationInsights/RequestTests.cs
Show resolved
Hide resolved
… and integration tests for dependencyName on LogDependency
...s.Observability.Tests.Integration/Serilog/Sinks/ApplicationInsights/CustomDependencyTests.cs
Outdated
Show resolved
Hide resolved
src/Arcus.Observability.Tests.Unit/Telemetry/ILoggerExtensionsTests.cs
Outdated
Show resolved
Hide resolved
src/Arcus.Observability.Tests.Unit/Telemetry/ILoggerExtensionsTests.cs
Outdated
Show resolved
Hide resolved
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.
We're almost there! Let's have @tomkerkhove another look, especially on the casting/child classes. Otherwise, great job! 🥇
…ationInsights/CustomDependencyTests.cs Co-authored-by: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
…Tests.cs Co-authored-by: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
…Tests.cs Co-authored-by: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
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.
I'll approve on my part. Great stuff!
...vability.Telemetry.Serilog.Sinks.ApplicationInsights/Converters/OperationContextConverter.cs
Show resolved
Hide resolved
...vability.Telemetry.Serilog.Sinks.ApplicationInsights/Converters/RequestTelemetryConverter.cs
Outdated
Show resolved
Hide resolved
…Name, changed the CreateTelemetryEntry method for the requests to add the requestMethod to the operationName if it is missing
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.
LGTM, thank you! 🎉
src/Arcus.Observability.Telemetry.Core/Logging/RequestLogEntry.cs
Outdated
Show resolved
Hide resolved
I think we are good to go, except for the integration tests - Are these on your radar? |
I updated the integration tests to check for the dependencyname and added some integration tests for the requestlogging to test specifying a custom operation name. |
They seem to be failing, can you please have a look? |
/azp run CI - Arcus.Observability |
Azure Pipelines successfully started running 1 pipeline(s). |
It's all looking green now 👍🏻 seems like the tests worked this time |
🙌 Thank you for the nice contribution! |
After discussion with @stijnmoreels we decided to add 2 overloads to be able to specify a custom operataion name as well.