Skip to content

Conversation

@rogercoll
Copy link
Contributor

  • Renaming a metric is in the scope of a processor component. For example, the following configuration is equivalent to the metrics_prefix: "my.metrics" configuration option:
processors:
  transform:
    metric_statements:
     - context: metric
       statements:
         - replace_pattern(name, "(.+)", "my.metrics.$$1")
  • Replaces the mockMetricsConsumer test structure in favor of collector's consumertest package

@rogercoll rogercoll requested a review from a team as a code owner November 14, 2025 09:09
mockConsumer.AssertNotCalled(t, "ConsumeMetrics", mock.Anything, mock.Anything)
}

func TestConsumeProfiles_ConsumeMetricsError(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed atm, the actual ConsumeMetrics implementation cannot return an error.

{name: "network/udp/write",
rx: regexp.MustCompile(`^(?:udp_sendmsg|udp_write|udp_push|udp_sendpage)`)},
{name: "ipc/read",
{
Copy link
Member

@christos68k christos68k Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there automated formatting in this repository that's consistent and reflects these changes? I see make gofmt but that doesn't result in additional formatting changes.

To avoid confusion with inconsistent formatting (that also adds additional review load as extra lines of code need to be checked) I suggest we first update the automated formatting in this repository to reflect these changes so that we all have a way to keep formatting consistent. Otherwise, we'll keep running into formatting inconsistencies as we use different editors with different settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good! I will create a follow-up PR for that. In any case, I removed the formatting changes for this PR f80e74d

@rogercoll rogercoll enabled auto-merge (squash) November 14, 2025 10:09
@rogercoll rogercoll disabled auto-merge November 14, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants