Skip to content

Commit

Permalink
Explore metrics: Always check that custom var is present for otel dep…
Browse files Browse the repository at this point in the history
… env migration (grafana#100233)
  • Loading branch information
bohandley authored Feb 7, 2025
1 parent 74b2b5f commit d16f231
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ export function migrateOtelDeploymentEnvironment(trail: DataTrail, urlParams: Ur
) {
return;
}
// if there is no dep env, does not need to be migrated
if (!deploymentEnv) {

// check that there is a deployment environment variable value to migrate
// in some cases the deployment environment may not present
// but due to this change it is now always present and the value is undefined
// https://github.com/grafana/scenes/pull/1033
if (
!deploymentEnv ||
(Array.isArray(deploymentEnv) && deploymentEnv.length > 0 && deploymentEnv[0] === 'undefined')
) {
return;
}

Expand Down

0 comments on commit d16f231

Please sign in to comment.