Repository: dotnet/aspnetcore
File: src/Components/Components/src/ComponentsMetrics.cs (C#)

Code before:
            "aspnetcore.components.navigate",
            unit: "{route}",
            description: "Total number of route changes.");

        _eventDuration = _meter.CreateHistogram(
            "aspnetcore.components.handle_event.duration",
            unit: "s",
            description: "Duration of processing browser event.  It includes business logic of the component but not affected child components.",
            advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.ShortSecondsBucketBoundaries });

        _parametersDuration = _lifeCycleMeter.CreateHistogram(
            "aspnetcore.components.update_parameters.duration",
            unit: "s",
            description: "Duration of processing component parameters. It includes business logic of the component.",
            advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingSecondsBucketBoundaries });

        _batchDuration = _lifeCycleMeter.CreateHistogram(
            "aspnetcore.components.render_diff.duration",
            unit: "s",
            description: "Duration of rendering component tree and producing HTML diff. It includes business logic of the changed components.",
            advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingSecondsBucketBoundaries });

        _batchSize = _lifeCycleMeter.CreateHistogram(
            "aspnetcore.components.render_diff.size",
            unit: "{elements}",
            description: "Number of HTML elements modified during rendering of batch of changes.",
            advice: new InstrumentAdvice<int> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingDiffLengthBucketBoundaries });
    }

    public void Navigation(string componentType, string route)
    {
        var tags = new TagList
        {
            { "aspnetcore.components.type", componentType ?? "unknown" },
            { "aspnetcore.components.route", route ?? "unknown" },
        };

        _navigationCount.Add(1, tags);
    }

    public async Task CaptureEventDuration(Task task, long startTimestamp, string? componentType, string? methodName, string? attributeName)
    {
        var tags = new TagList
        {
            { "aspnetcore.components.type", componentType ?? "unknown" },
            { "aspnetcore.components.method", methodName ?? "unknown" },
            { "aspnetcore.components.attribute.name", attributeName ?? "unknown" }
        };

        try
        {

Review comment (performance):
I don't know if this is correct. But the previous description didn't read well.
```suggestion
            description: "Number of HTML elements modified during a rendering batch.",
```

Code after:
            "aspnetcore.components.navigate",
            unit: "{route}",
            description: "Total number of route changes.");

        _eventDuration = _meter.CreateHistogram(
            "aspnetcore.components.handle_event.duration",
            unit: "s",
            description: "Duration of processing browser event.  It includes business logic of the component but not affected child components.",
            advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.ShortSecondsBucketBoundaries });

        _parametersDuration = _lifeCycleMeter.CreateHistogram(
            "aspnetcore.components.update_parameters.duration",
            unit: "s",
            description: "Duration of processing component parameters. It includes business logic of the component.",
            advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingSecondsBucketBoundaries });

        _batchDuration = _lifeCycleMeter.CreateHistogram(
            "aspnetcore.components.render_diff.duration",
            unit: "s",
            description: "Duration of rendering component tree and producing HTML diff. It includes business logic of the changed components.",
            advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingSecondsBucketBoundaries });

        _batchSize = _lifeCycleMeter.CreateHistogram(
            "aspnetcore.components.render_diff.size",
            unit: "{elements}",
            description: "Number of HTML elements modified during a rendering batch.",
            advice: new InstrumentAdvice<int> { HistogramBucketBoundaries = MetricsConstants.BlazorRenderingDiffLengthBucketBoundaries });
    }

    public void Navigation(string componentType, string route)
    {
        var tags = new TagList
        {
            { "aspnetcore.components.type", componentType ?? "unknown" },
            { "aspnetcore.components.route", route ?? "unknown" },
        };

        _navigationCount.Add(1, tags);
    }

    public async Task CaptureEventDuration(Task task, long startTimestamp, string? componentType, string? methodName, string? attributeName)
    {
        var tags = new TagList
        {
            { "aspnetcore.components.type", componentType ?? "unknown" },
            { "aspnetcore.components.method", methodName ?? "unknown" },
            { "aspnetcore.components.attribute.name", attributeName ?? "unknown" }
        };

        try
        {