Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Geneva] Optimize metrics exporter serializer #2460

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Geneva] Optimize metrics exporter serializer
pentp committed Jan 10, 2025
commit 1fb632dbb832aebe7b9b9aefd6cfc316aec297e8
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
using OpenTelemetry.Exporter.Geneva.Metrics;
using OpenTelemetry.Internal;
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;

namespace OpenTelemetry.Exporter.Geneva;

@@ -34,8 +33,6 @@ public partial class GenevaMetricExporter : BaseExporter<Metric>

private bool isDisposed;

private Resource? resource;

/// <summary>
/// Initializes a new instance of the <see cref="GenevaMetricExporter"/> class.
/// </summary>
@@ -87,7 +84,7 @@ public GenevaMetricExporter(GenevaMetricExporterOptions options)
out var metricsNamespace);

var otlpProtobufExporter = new OtlpProtobufMetricExporter(
() => { return this.Resource; },
() => this.ParentProvider.GetResource(),
transport,
metricsAccount,
metricsNamespace,
@@ -109,8 +106,6 @@ public GenevaMetricExporter(GenevaMetricExporterOptions options)

private delegate ExportResult ExportMetricsFunc(in Batch<Metric> batch);

internal Resource Resource => this.resource ??= this.ParentProvider.GetResource();

/// <inheritdoc/>
public override ExportResult Export(in Batch<Metric> batch)
{
Loading