Skip to content

Commit

Permalink
After review
Browse files Browse the repository at this point in the history
  • Loading branch information
pondzix committed Nov 13, 2024
1 parent 6ef2bc2 commit d050809
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/models/target_write_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func TestNewTargetWriteResult_WithMessages(t *testing.T) {
assert.Equal(time.Duration(65)*time.Minute, r3.AvgE2ELatency)
}

// TestNewTargetWriteResult_NoTransformation tests that reporting of statistics is as it should be when we don't have a timeTransformed and no collector timestamp
// TestNewTargetWriteResult_NoTransformation_NoE2E tests that reporting of statistics is as it should be when we don't have a timeTransformed and no collector timestamp
func TestNewTargetWriteResult_NoTransformation_NoE2E(t *testing.T) {
assert := assert.New(t)

Expand Down
8 changes: 4 additions & 4 deletions pkg/transform/transformconfig/transform_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ var SupportedTransformations = []config.ConfigurationPair{
func GetTransformations(c *config.Config, supportedTransformations []config.ConfigurationPair) (transform.TransformationApplyFunction, error) {
funcs := make([]transform.TransformationFunction, 0)

if c.Data.Metrics.E2ELatencyEnabled {
funcs = append(funcs, transform.CollectorTstampTransformation())
}

for _, transformation := range c.Data.Transformations {

useTransf := transformation.Use
Expand All @@ -66,9 +70,5 @@ func GetTransformations(c *config.Config, supportedTransformations []config.Conf
funcs = append(funcs, f)
}

if c.Data.Metrics.E2ELatencyEnabled {
funcs = append(funcs, transform.CollectorTstampTransformation())
}

return transform.NewTransformation(funcs...), nil
}

0 comments on commit d050809

Please sign in to comment.