Skip to content
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

OpenTelemetry Support #2395

Merged
merged 7 commits into from
Apr 12, 2024
Merged

OpenTelemetry Support #2395

merged 7 commits into from
Apr 12, 2024

Conversation

RohitRanjanMS
Copy link
Member

Enhancing the DotNet Worker with OpenTelemetry Support involves two key changes aimed at improving telemetry integration and traceability:

Context Propagation
Introduced a foundational Activity serving as the precursor to the "Invoke" activity or any customer-generated activity. This foundational activity emulates the remote activity in the Host process, enabling the correlation of all logs and traces with the server/consumer telemetry emitted by the host process.

OpenTelemetryBuilder extension method for Azure Functions
a. Functions Resource Detector - This component automatically detects and applies a set of standard attributes defined by the OTel Spec to the telemetry data.
b. Worker Capability - To signal the Host to disregard any logs produced by the worker process.

.ConfigureServices(s =>
{
   s.AddOpenTelemetry()
    .UseFunctionsWorkerDefaults()
    .UseAzureMonitor();
})

Reverse Proxy Scenario

Client Telemetry from Console App
-- -> Console App Outgoing Request
-- -- -> Functions Host Incoming Request
-- -- -- -> Functions Host Outgoing Request
-- -- -- -- -> DotNet Worker Incoming Request
-- -- -- -- -- -> Outgoing Request to bing.com from Worker 
image image

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

@RohitRanjanMS RohitRanjanMS mentioned this pull request Apr 12, 2024
7 tasks
@RohitRanjanMS RohitRanjanMS requested a review from jviau April 12, 2024 12:39
jviau
jviau previously requested changes Apr 12, 2024
src/DotNetWorker.OpenTelemetry/README.md Outdated Show resolved Hide resolved
src/DotNetWorker.OpenTelemetry/README.md Outdated Show resolved Hide resolved
src/DotNetWorker.Core/FunctionsApplication.cs Show resolved Hide resolved
@RohitRanjanMS RohitRanjanMS requested a review from jviau April 12, 2024 18:51
@RohitRanjanMS RohitRanjanMS dismissed jviau’s stale review April 12, 2024 20:03

Made the change locally and pushed.

src/DotNetWorker.OpenTelemetry/README.md Outdated Show resolved Hide resolved
src/DotNetWorker.OpenTelemetry/release_notes.md Outdated Show resolved Hide resolved
RohitRanjanMS and others added 2 commits April 12, 2024 13:30
@RohitRanjanMS RohitRanjanMS merged commit d45568b into main Apr 12, 2024
22 checks passed
@RohitRanjanMS RohitRanjanMS deleted the roranjan/OTelSupportV2 branch April 12, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants