Skip to content

Correlate traces and dependencies with the same Operation Id - #157

Merged
ivan-nikalaichanka-4ss merged 3 commits into
masterfrom
ESS-4340
Aug 26, 2026
Merged

Correlate traces and dependencies with the same Operation Id#157
ivan-nikalaichanka-4ss merged 3 commits into
masterfrom
ESS-4340

Conversation

@ivan-nikalaichanka-4ss

@ivan-nikalaichanka-4ss ivan-nikalaichanka-4ss commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This PR is related to user story ESS-4340

Description

Wrap the function's logic in an OpenTelemetry span so the manual log entry and auto-tracked HTTP calls dependencies it produces share the same Operation Id in Application Insights.

Checklist

  • PR title is descriptive and fit for injection into release notes (see tips below)
  • Correct label(s) are used

@ivan-nikalaichanka-4ss ivan-nikalaichanka-4ss added the chore Work related to, but not touching the code label Aug 25, 2026
@ivan-nikalaichanka-4ss ivan-nikalaichanka-4ss added enhancement New feature or request and removed chore Work related to, but not touching the code labels Aug 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to ensure manual tracing/logging and automatically tracked dependencies (e.g., HTTP client spans) share the same Azure Application Insights Operation Id by introducing an explicit OpenTelemetry span around the timed client operations and centralizing metric logger setup.

Changes:

  • Add an OpenTelemetry span around _timer-decorated client methods so dependency telemetry is correlated under the same operation.
  • Move metric logger initialization/configuration into datareservoirio/_logging.py (get_metric_logger) and update client.py to use it.
  • Remove now-redundant metric-logger/configuration code from client.py.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
datareservoirio/client.py Wrap timed client operations in a current span and emit metrics via the centralized metric logger.
datareservoirio/_logging.py Introduce get_metric_logger() to configure and return the metrics logger used for telemetry emission.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread datareservoirio/_logging.py
@ivan-nikalaichanka-4ss
ivan-nikalaichanka-4ss merged commit f4b111d into master Aug 26, 2026
12 checks passed
@ivan-nikalaichanka-4ss
ivan-nikalaichanka-4ss deleted the ESS-4340 branch August 26, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants