Fix parameter filtering in the batch telemetry sample dashboard - #21
Open
Kenny Saelen (kennysaelen) wants to merge 3 commits into
Open
Kenny Saelen (kennysaelen) wants to merge 3 commits into
Kenny Saelen (kennysaelen) wants to merge 3 commits into
Conversation
The Environment Id, Batch Job Id and Activity Id parameters did not filter correctly. Most issues were field-name casing mismatches between the tile queries and the values the parameter lookup queries return, so tiles silently returned no rows when a parameter was selected. Fixed: - Environment Id matched nothing and blanked all 13 tiles: tiles filtered on customDimensionsParsed.EnvironmentId but the emitted field is environmentId. - Batch Infolog Errors query failed outright on cvustomDimensionsParsed typo. - Batch server #tasks execution spread blanked on job selection, reading customDimensionsParsed.batchJobId where the emitted field is BatchJobId. - Environment Id ignored multi-select: declared as array but filtered with scalar equality. Now uses in (_environmentId). - Activity Id parameter had no effect - declared but referenced by no tile. Now applied to the Batch execution history tile. - Activity Id value list came from pageViews, which carries no batch activity ids. Now sourced from batch customEvents. - Environment Id value list was hardcoded to ago(7d) .. now(), hiding environments outside a 7-day window. Now bound to the dashboard time range. Changed: - Batch Job Id now supports multi-select; filters already used in (). - Activity Id value list includes BatchJobStart and BatchJobFinished. Added: - Dashboards/AzureDataExplorer/CHANGELOG.md Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Parameter lookup queries cannot reference the Time range parameter variables _startTime / _endTime - those resolve only in tile queries - so a lookup using them fails to compile with a semantic error. - Batch Job Id lookup referenced them and was already broken before this branch. - Environment Id lookup was moved onto them earlier in this branch, mistaking the original ago(7d) window for an oversight rather than a deliberate workaround. Reverted. - Activity Id lookup, rewritten earlier in this branch, had the same problem. All three lookups now use a fixed ago(7d) .. now() window. Changelog corrected accordingly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reverts the previous commit. The semantic error on _startTime / _endTime in the parameter lookup queries was the ADX query editor validating before the query had been run once from within the parameter editor - not a real scope limitation. The variables resolve correctly at runtime, confirmed by import testing. All three lookups (Activity Id, Batch Job Id, Environment Id) are back on _startTime .. _endTime, so all 16 queries share the dashboard time range. Changelog restored and annotated with the editor caveat. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
The Environment Id, Batch Job Id and Activity Id parameters on the batch dashboard did not filter correctly. Most of the issues were field-name casing mismatches between the tile queries and the values the parameter lookup queries actually return, which caused tiles to silently return no rows when a parameter was selected.
Fixed
customDimensionsParsed.EnvironmentId, but the emitted field isenvironmentId(lowercasee) — the casing the parameter's own lookup query already reads.cvustomDimensionsParsed.EnvironmentId, an undefined identifier — an error rather than an empty result.customDimensionsParsed.batchJobIdwhere the emitted field isBatchJobId.selectionType: array, but filtered with scalar== _environmentId; correct for one selection, wrong for several. Nowin (_environmentId).ActivityIdcolumn.pageViews, client/UI telemetry with no batch activity ids, so the picker offered values that could never match. Now sourced from batchcustomEvents.ago(7d) .. now(). With a wider time range, environments present only in the older window were missing from the picker even though the tiles filtered on them correctly. All 16 queries now share the dashboard time range.Changed
scalar→array). No query changes were required — the filtering tiles already usedin (_batchJobId).BatchJobStartandBatchJobFinished, so activity ids appearing only on job-level events are selectable.Added
Dashboards/AzureDataExplorer/CHANGELOG.md, seeded with the above.Result
All three parameters are now consistent:
arrayselection withincludeAllOption,in (...)membership filters guarded byisempty(), and lookup queries bound to the dashboard time range.Note for reviewers
With Batch Job Id multi-select enabled, Batch server #tasks execution spread and Batch execution history aggregate across all selected jobs.
Verified by importing the dashboard into Azure Data Explorer.