Fix for logger name in OpenTelemetry exporter - #154
Merged
ali-amin-ahmad-4ss merged 4 commits intoJul 30, 2026
Conversation
…to custom dimentions automatically. There is no need to provide a dictionary with the keyword "customDimentions".
There was a problem hiding this comment.
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 vialogging.getLogger(...). - Flatten
extraproperties fromcustomDimensions.{...}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 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
approved these changes
Jul 29, 2026
grzegorz-juras-4ss
left a comment
Contributor
There was a problem hiding this comment.
Nothing to complain about, ready to merge.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is related to user story ESS-2506
Description
Fix logger name for OpenTelemetry exporter.
Also simplified the
customDimentionsexport