open-telemetry / open-telemetry/opentelemetry-java-instrumentation

Azure Function App to Function App calling + Instrumentation

Open
#14,167 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2.6k
Forks
1.2k
Avg merge
2d 18h
Merged PRs (30d)
228

Description

I have two separate function apps 'A' and function app 'B' (both are HttpTrigger apps). I'm calling App 'B' from app 'A' through HttpURLConnection (also tried with Spring webflux i.e webClient) and both the apps A and B are well instrumented using opentelemetry java agent. All the required Otel properties are set in both the function apps and I can see Trace Id and SpanId in Grafana but my query is - Ideally, there should be minimum 3 Span Id's for single Trace Id but I am getting only 2 Span Id's. Span Id for funciton app B is missing. can someone help me to get all Span Id's

Function app A - otel settings

-javaagent:/home/site/wwwroot/opentelemetry-javaagent.jar -Dotel.instrumentation.azure-functions.enabled=true -Dotel.service.name=HttpExamplePeer2 -Dotel.exporter.otlp.endpoint=http://MyIPAddress:MyPORT -Dotel.propagators=tracecontext,baggage -Dotel.logs.exporter=none -Dotel.metrics.exporter=none -Dotel.instrumentation.methods.include=com.function.caller.Function[run] -Dotel.exporter.otlp.traces.protocol=grpc

Function app B - otel settings

-javaagent:/home/site/wwwroot/opentelemetry-javaagent.jar -Dotel.instrumentation.azure-functions.enabled=true -Dotel.service.name=HttpExamplePeer1 -Dotel.exporter.otlp.endpoint=http://MyIPAddress:MyPORT -Dotel.propagators=tracecontext,baggage -Dotel.logs.exporter=none -Dotel.metrics.exporter=none -Dotel.exporter.otlp.traces.protocol=grpc

Way to call function app A using browser is : https://fa-peer-to-peer-2.azurewebsites.net/api/HttpExamplePeer2

Grafana -

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the OpenTelemetry Java agent settings for Function Apps A and B, especially tracecontext propagation and Azure Functions instrumentation. Reproduce the HTTP call from A to B and inspect the resulting Grafana trace to determine whether B receives the context and creates its span. Done means the trace includes the expected span for Function App B.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, java
Domain
cloud, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.