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

Java worker instrumentation #10742

Open
RohitRanjanMS opened this issue Jan 14, 2025 · 0 comments
Open

Java worker instrumentation #10742

RohitRanjanMS opened this issue Jan 14, 2025 · 0 comments

Comments

@RohitRanjanMS
Copy link
Member

RohitRanjanMS commented Jan 14, 2025

  • Enable the worker's capability to prevent the generation of duplicate logs. (Application Insights example in Isolated)

  • Implement a Resource Detector, set resource attributes for applications running on Azure Functions. Applicable to traces and logs, but potentially metrics as well.

Attributes Description -
cloud.platform azure_functions
cloud.provider azure
cloud.resource_id /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Web/sites/{appName}
cloud.region e.g., "East US", "West Europe", etc
deployment.environment The deployment slot where the Functions App is running, such as "staging", "production", etc.

Python resource API - https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py
Example of APP Service resource detector in .Net - https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.ResourceDetectors.Azure

  • Context Propagation : context.trace_context.Traceparent and context.trace_context.Tracestate are passed to the worker as part of the invocation request.
  • Generate a span based on the context.
  • Designate this span as the current one.
  • Execute the customer's code within this context.
  • Avoid initiating the span to prevent it from being monitored; we do not intend to export this span.
  • Set the attributes like invocationid, processId and hostinstanceId.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant