#7 Ensure dsoa.run.context is available as metric dimensions and #8 as custom name in telemetry sender#18
Merged
sebastiankruk merged 4 commits intodynatrace-oss:release/0.9.2from Oct 27, 2025
Conversation
…er traceability
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request ensures that the dsoa.run.context dimension is consistently available across all metric emissions in the Dynatrace Snowflake Observability Agent. The main changes involve:
- Reclassifying
dsoa.run.contextfrom an attribute to a dimension in the semantic definitions - Refactoring context-related functions to separate concerns between full context creation and dimension-only context
- Propagating the context name through the metrics reporting pipeline
Key Changes:
- Renamed
get_context_by_name()toget_context_name_and_run_id()for clarity - Added new
get_context_name()function to generate dimension-only context dictionaries - Modified metrics API to accept and merge context name dimensions into metric payloads
- Updated all test result expectations to include the
dsoa.run.contextdimension
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/dtagent/context.py | Renamed function and added new helper for dimension-only context |
| src/dtagent/otel/metrics.py | Updated metrics API to accept and merge context name into dimensions |
| src/dtagent/plugins/init.py | Updated metrics reporting calls to pass context name |
| src/dtagent.conf/instruments-def.yml | Moved dsoa.run.context from attributes to dimensions |
| SEMANTICS.md | Reclassified dsoa.run.context as a dimension in documentation |
| test/otel/test_events.py | Updated function references for renamed context function |
| Multiple test result files | Updated expected metrics output to include dsoa.run.context dimension |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 71 out of 71 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dorian-krefft-dt
approved these changes
Oct 27, 2025
sebastiankruk
added a commit
that referenced
this pull request
Nov 24, 2025
* refactoring plugins code to use generic functions * code quality controls * black formatter configuration * code cleanup based on results * action mapping * documentation update for query history plugin * updating documentation for snowflake.query.with_operator_stats attribute * fixing markdown * enabling documentation tests * Update CHANGELOG.md * enabling all tests * adding default config for tests * Enhance documentation and setup scripts for Dynatrace Snowflake Observability Agent * Added prerequisites and environment setup instructions to INSTALL.md * Expanded contributing guidelines in CONTRIBUTING.md * Implemented command checks in package.sh to ensure required tools are installed * Introduced GitHub Actions workflow for automated build and release process * Update .github/workflows/release.yml * Update INSTALL.md * disabling release on dev/build_artifacts * #12 Add dashboard examples: costs monitoring, self-monitoring, and snowflake security dashboards, with description and screenshots. * Refactor plugin descriptions from info.md to readme.md * Move debug help docs to debug/ directory * Add tools for dashboard JSON/YAML conversion * #12 added link to dashboard examples * update version number to 0.9.2 * #6 updating requirements for Dynatrace tokens to receive OpenPipeline Events * Update docs/dashboards/snowflake-security/readme.md * Update CONTRIBUTING.md * #6 Refactoring events API to common codebase * #6 improving event tests * #6 aligning tests with refactoring * #5 refactoring for generic vs davis events * #6 serious refactoring to deliver consistent support for 3 basic types of event APIs * #6 mocking session.sql for local calls and dumping data used in tests into ndjson * #6 mocking only local tests * #6 extracting JSON payload from OTEL * #6 deduplicating query results; logs exporter configurable * #6 we don't send data[event.type] in bizevents anymore * Documentation updated to match changes in fields definitions * #6 fixing generic and davis events, and the use of the latter in the telemetry sender * #7 Ensure dsoa.run.context is available as metric dimensions and #8 as custom name in telemetry sender (#18) * #7 Ensure dsoa.run.context is available as metric dimensions for better traceability * #7 updating tests * #8 set custom context name in telemetry_sender * added automatic markdown formatting on save * #5 default configurations for selecting telemetry types sent * #5 enabling to disable telemetry channels * #5 refactoring returned values from process() into a telemetry counts dictionary * #5 extending tests to test disabled telemetry * #5 complete tests for selective telemetry types sending * #5 small updates to the documentation * overall improvements (#20) * introducing flow operator in queries * adding "dsoa.run.id" to self-monitoring bizevents * adding "app.*" to deployment bizevents * improving self-monitoring telemetry sent with bizevents * ensuring that dsoa.run.plugin is always set, and that dsoa.run.id is consistent * differentiating between dsoa.run.context and dsoa.run.plugin * ensuring plugin name is correctly set for telemetry sender; adjusting tests * cleaning up the code * consistent context naming for self_monitoring * cleaning up docs in yamls * adding "dsoa.run.id" to self-monitoring bizevents; * ensuring plugin name is correctly set for telemetry sender * cleaninig up docs in yamls * improving docstrings * cleaning up docstrings in tests * Update src/build/compile_bom.py * Small fixes in semantics dictionary (#4) * muting some docstrings in tests * adding "dsoa.run.id" to self-monitoring bizevents; adding "app.*" to deployment bizevents * ensuring that dsoa.run.plugin is always set, and that dsoa.run.id is consistent, differentiating between dsoa.run.context and dsoa.run.plugin * #6 important fix to deployment bizevents sender * #6 added gc.collect to events sending in telemetry_sender * aligning pylint test settings in build.sh and test.sh with default config for this project * #6 enabling timestamp events in users plugin * fixing view definitions * aligning users plugin with recent changes in Snowflake telemetry * users code and tests aligned * #6 fixing user tests * improving memory handling for large results sets * fixing flow calls in resource monitors plugin * adding default settings for the new events telemetry * small fixes (#23) * extending event log metrics with support for record_attributes (#27) * #26 support for RECORD_ATTRIBUTES for metric event logs * Documentation sync; yaml testing in src only * Add safety limits and exclude high volume applications in event log queries * Refactor code structure for improved readability and maintainability * Refactor data reporting structure in Plugin and DataVolumePlugin for improved clarity and consistency * Add API post timeout and retry delay configurations for metrics and events * Fixing regular mode detection * Refactor event log SQL queries to ensure consistent ordering and maintain safety limits * Add PLUGIN_NAME attribute to all plugins and refactor result reporting to ensure proper dsoa.run.plugin value * Refactor timestamp handling in get_timestamp_in_ms and add unit tests for validation * Code cleanup * Refactor telemetry keys in configuration files to use lowercase for consistency * Fix handling of subOperationType in DataSchemasPlugin to default to 'unknown' * Normalize telemetry keys in configuration files to lowercase for consistency * Enhance event log metrics view to handle null RECORD_ATTRIBUTES and include additional record attributes * Add detailed test execution modes and setup instructions to CONTRIBUTING.md * Add troubleshooting guide for no data issues in Dynatrace Snowflake Observability Agent * Update changelog for version 0.9.2: correct release date, enhance descriptions, and add new features * Enhance README and configuration readme: add class to logo image for improved styling in PDF output
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.
No description provided.