Repository navigation
Conversation
Not tied to an existing issue - explicit ask: demo OpenTelemetry concepts using the real Application Insights agents for both Java and .NET, not the vanilla OTel SDK/collector. - java-service (Spring Boot): auto-instrumented with the real Application Insights Java agent (-javaagent), calls... - dotnet-service (ASP.NET Core): auto-instrumented with the real Azure Monitor OpenTelemetry Distro (Azure.Monitor.OpenTelemetry. AspNetCore, UseAzureMonitor()) - a second hop in one HTTP call chain, with zero OpenTelemetry-aware code in either handler. Researched and empirically verified before building anything (a researcher subagent + my own direct testing, since the two claims disagreed): neither agent needs a REAL Azure resource to attach and instrument - only a well-formed connection string. Confirmed directly: - No connection string / malformed string -> the .NET distro throws InvalidOperationException at startup and Java can fail similarly. - A syntactically valid but fake connection string (real region endpoint, fake instrumentation key) -> both agents attach fully, both apps run and serve real traffic, and only the final Azure export call is rejected (Java logs a clean "400 Invalid instrumentation key" - itself proof telemetry was captured and an export was attempted). This is what makes the whole thing verifiable without an Azure subscription: demo_project.sh runs both services with a placeholder connection string and proves, not asserts: - both agents actually attached (Java's startup banner; the .NET service simply not crashing, given the above) - the real cross-service HTTP call produces IDENTICAL OpenTelemetry trace IDs on both sides (each service reads its own auto- instrumented Span.current() / Activity.Current and reports it) - genuine W3C traceparent propagation across the JVM/CLR boundary, zero manual trace-linking code - two independent, unrelated requests get two DIFFERENT trace IDs - ruling out a hardcoded/constant value - the Java agent's real export attempt and its rejection, in the logs Swap in a real APPLICATIONINSIGHTS_CONNECTION_STRING to see the same run land in an actual Azure Application Insights resource - documented in the project README. Adds .github/workflows/verify-opentelemetry-appinsights-demo.yml (matching the existing per-project verify-*.yml convention - this one needs only Docker, no kind/kubectl/helm, since both services and their agents run entirely inside their own containers). README.md: new row (25) linking directly to the project folder. Tests: ran the exact committed demo_project.sh end-to-end against real Docker containers, twice. shellcheck clean. mvn test / dotnet build both clean.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explicit ask, not tied to an issue: demo OpenTelemetry concepts using the real Application Insights agents for both Java and .NET specifically (not the vanilla OTel SDK/collector).
Summary
java-service(Spring Boot): auto-instrumented with the real Application Insights Java agent (-javaagent:applicationinsights-agent.jar).dotnet-service(ASP.NET Core): auto-instrumented with the real Azure Monitor OpenTelemetry Distro (Azure.Monitor.OpenTelemetry.AspNetCore,UseAzureMonitor()).Why this is verifiable without an Azure subscription
Researched and then empirically verified directly (a researcher subagent's findings and my own hands-on testing initially disagreed, so I didn't take either at face value):
InvalidOperationExceptionat startup; confirmed directly.400 Invalid instrumentation key, which is itself proof telemetry was captured and an export was attempted, not proof it's broken.demo_project.shuses exactly this placeholder-but-well-formed connection string, and proves (not asserts):Span.current()/Activity.Current) — genuine W3Ctraceparentpropagation across the JVM/CLR boundarySwap in a real
APPLICATIONINSIGHTS_CONNECTION_STRINGto see the same run land in an actual Azure Application Insights resource — documented in the project README..github/workflows/verify-opentelemetry-appinsights-demo.yml, matching the existing per-projectverify-*.ymlconvention — needs only Docker, since both services and their agents run entirely inside their own containers.Test plan
demo_project.shend-to-end against real Docker containers, twice.shellcheck demo_project.sh— clean.mvn test(Java) anddotnet build(.NET) — both clean.yaml.safe_load.