Skip to content

Fix for logger name in OpenTelemetry exporter - #154

Merged
ali-amin-ahmad-4ss merged 4 commits into
masterfrom
ESS-2506-investigate-drio-python-package-not-sending-version-information-to-app-insights
Jul 30, 2026
Merged

Fix for logger name in OpenTelemetry exporter#154
ali-amin-ahmad-4ss merged 4 commits into
masterfrom
ESS-2506-investigate-drio-python-package-not-sending-version-information-to-app-insights

Conversation

@ali-amin-ahmad-4ss

@ali-amin-ahmad-4ss ali-amin-ahmad-4ss commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This PR is related to user story ESS-2506

Description

Fix logger name for OpenTelemetry exporter.
Also simplified the customDimentions export

Copilot AI left a comment

Copy link
Copy Markdown

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 aligns the OpenTelemetry/Azure Monitor logging configuration with the actual logger instance name, and simplifies how extra log properties are attached to exception logs.

Changes:

  • Fix logger name passed to configure_azure_monitor(...) so it matches the logger created via logging.getLogger(...).
  • Flatten extra properties from customDimensions.{...} into top-level attributes (e.g., drioPackage, engineRoomAppId) and update the corresponding test expectation.

Reviewed changes

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

File Description
datareservoirio/_logging.py Fixes the Azure Monitor exporter logger name and flattens exported extra properties.
tests/test__logging.py Updates assertions to match the new flattened extra property shape.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 38 to 41
_ensure_azure_monitor_configured(
connection_string=environment._application_insight_connectionstring,
logger_name=__name__ + "_exceptions_logger",
logger_name=__name__ + "_exception_logger",
)
Comment thread tests/test__logging.py
Comment on lines 38 to +40
self.logging_as_exception = True
if os.getenv("ENGINE_ROOM_APP_ID") is not None:
self.engine_room_app_id = kwargs["extra"]["customDimensions"][
"engineRoomAppId"
]
self.engine_room_app_id = kwargs["extra"]["engineRoomAppId"]

@grzegorz-juras-4ss grzegorz-juras-4ss 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.

Nothing to complain about, ready to merge.

@ali-amin-ahmad-4ss
ali-amin-ahmad-4ss merged commit 51c6e13 into master Jul 30, 2026
13 checks passed
@ali-amin-ahmad-4ss
ali-amin-ahmad-4ss deleted the ESS-2506-investigate-drio-python-package-not-sending-version-information-to-app-insights branch July 30, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

3 participants