Set the dropHostWithTagKey field in the SignalFx sink.
@@ -328,6 +328,7 @@ func newSignalFxSink(
commonDimensions: commonDimensions,
defaultClient: client,
defaultToken: config.APIKey.Value,
+ dropHostWithTagKey: config.DropHostWithTagKey,
dynamicKeyRefreshPeriod: config.DynamicPerTagAPIKeysRefreshPeriod,
enableDynamicPerTagTokens: config.DynamicPerTagAPIKeysEnable,
hostname: hostname,
@@ -583,11 +584,6 @@ METRICLOOP: // Convenience label so that inner nested loops and `continue` easil
}
}
- for k := range sfx.excludedTags {
- delete(dims, k)
- }
- delete(dims, "veneursinkonly")
-
if metric.Type == samplers.CounterMetric && sfx.dropHostWithTagKey != "" {
_, ok := dims[sfx.dropHostWithTagKey]
if ok {
@@ -595,6 +591,11 @@ METRICLOOP: // Convenience label so that inner nested loops and `continue` easil
}
}
+ for k := range sfx.excludedTags {
+ delete(dims, k)
+ }
+ delete(dims, "veneursinkonly")
+
var point *datapoint.Datapoint
switch metric.Type {
case samplers.GaugeMetric:
