Skip to content

Commit

Permalink
Fix old slug automagic
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jul 7, 2023
1 parent 0c74357 commit a882cf0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/plugins/grafana/send-annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function send(
urlAndGroup[1]
];
// Avoid having the same annotations twice https://github.com/sitespeedio/sitespeed.io/issues/3277#
if (options.slug && options.slug !== urlAndGroup[0]) {
if (options.slug) {
tags.push(options.slug);
}
const extraTags = toArray(options.grafana.annotationTag);
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/graphite/data-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function keyPathFromMessage(message, options, includeQueryParameters, alias) {
typeParts.splice(1, 0, toSafeKey(message.group));
}

if (options.graphite && options.graphite.addSlugToKey) {
if (options.graphite && options.graphite.addSlugToKey && options.slug) {
typeParts.unshift(options.slug);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/graphite/send-annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export function send(
urlAndGroup[0],
urlAndGroup[1]
];
// See https://github.com/sitespeedio/sitespeed.io/issues/3277
if (options.slug && options.slug !== urlAndGroup[0]) {

if (options.slug) {
tags.push(options.slug);
}
const extraTags = toArray(options.graphite.annotationTag);
Expand Down
4 changes: 3 additions & 1 deletion lib/plugins/influxdb/data-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ export class InfluxDBDataGenerator {
tags.group = toSafeKey(message.group, options.influxdb.groupSeparator);
}

tags.testName = options.slug;
if (this.options.slug) {
tags.testName = options.slug;
}

return tags;
}
Expand Down
3 changes: 1 addition & 2 deletions lib/plugins/influxdb/send-annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export function send(
).split('.');
let tags = [connectivity, browser, urlAndGroup[0], urlAndGroup[1]];

// See https://github.com/sitespeedio/sitespeed.io/issues/3277
if (options.slug && options.slug !== urlAndGroup[0]) {
if (options.slug) {
tags.push(options.slug);
}

Expand Down

0 comments on commit a882cf0

Please sign in to comment.