Skip to content

Add OpenTelemetry instrumentation for business layer #28446

@hieheihei

Description

@hieheihei

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

We have integrated the OpenTelemetry SDK with automatic instrumentation for infrastructure components (HTTP, DB, Redis, Celery). But the collected telemetry data is very limited—only infrastructure-level spans are captured.

The existing OpsTrace mechanism captures Workflow execution data; however, its asynchronous post-execution collection model differs from OpenTelemetry's real-time instrumentation, making direct trace correlation impossible.

We suggest adding OpenTelemetry instrumentation to the business layer. The proposed instrumentation targets include: AppGenerateService.generate() (entry point), various AppRunner.run() methods (e.g., WorkflowAppRunner, ChatAppRunner), Workflow and Node execution, LLM model invocations, and RAG retrieval calls.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions