[GOBBLIN-2246] Make Orchestrator MDM metric dimesnion configurable #4164
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds runtime-configurable dimensions support for the jobSucceeded OpenTelemetry metric in GaaS observability events. The changes enable orchestrators to control which dimensions are emitted through configuration while maintaining backward compatibility with baseline dimensions.
Changes:
- Introduced configurable dimension mapping via
metrics.reporting.opentelemetry.jobSucceeded.dimensionsMapallowing orchestrators to map OTel dimension keys to GaaSJobObservabilityEvent Avro fields - Added support for per-job extra dimensions from job properties with all-or-nothing enforcement based on
maxDimensionscap (default: 20) - Refactored tests to use try-with-resources pattern for proper resource cleanup
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| GaaSJobObservabilityEventProducer.java | Core implementation adding dimension configuration logic, baseline dimension preservation, duplicate detection, and dimension cap enforcement |
| GaaSJobObservabilityProducerTest.java | Updated existing tests to use try-with-resources; added 6 new tests covering dimension map configurations, baseline backfilling, duplicate handling, and maxDimensions enforcement |
| GsonUtils.java | Added plain GSON instance for general-purpose JSON parsing without special adapters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...e/src/main/java/org/apache/gobblin/service/monitoring/GaaSJobObservabilityEventProducer.java
Show resolved
Hide resolved
...e/src/main/java/org/apache/gobblin/service/monitoring/GaaSJobObservabilityEventProducer.java
Show resolved
Hide resolved
...e/src/main/java/org/apache/gobblin/service/monitoring/GaaSJobObservabilityEventProducer.java
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #4164 +/- ##
============================================
- Coverage 49.12% 41.23% -7.90%
+ Complexity 10253 4150 -6103
============================================
Files 1924 904 -1020
Lines 75350 37965 -37385
Branches 8361 4083 -4278
============================================
- Hits 37012 15653 -21359
+ Misses 35039 20854 -14185
+ Partials 3299 1458 -1841 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
Updated
jobSucceededOTel metric emission to support runtime-configurable dimensions.metrics.reporting.opentelemetry.jobSucceeded.dimensionsMap(OTel key →GaaSJobObservabilityEventAvro field).metrics.reporting.opentelemetry.jobSucceeded.extraDimensions.enabledgate.metrics.reporting.opentelemetry.jobSucceeded.maxDimensions(default 20). If baseline+orchestrator exceeds the cap, orchestrator dims are dropped; template extras are included only if all fit.Tests
Added unit tests
Commits