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

Add support for createservicetimeseries to the SDK metrics exporter #820

Closed
dashpole opened this issue Mar 15, 2024 · 2 comments · Fixed by #837
Closed

Add support for createservicetimeseries to the SDK metrics exporter #820

dashpole opened this issue Mar 15, 2024 · 2 comments · Fixed by #837
Assignees
Labels
enhancement New feature or request priority: p1

Comments

@dashpole
Copy link
Contributor

Similar to the collector exporter, add config that enables CSTS:

// CreateServiceTimeSeries, if true, this will send all timeseries using `CreateServiceTimeSeries`.
// Implicitly, this sets `SkipMetricDescriptor` to true.
CreateServiceTimeSeries bool `mapstructure:"create_service_timeseries"`

(handle compression, if applicable)

client.CallOptions.CreateServiceTimeSeries = append(client.CallOptions.CreateServiceTimeSeries,
gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name)))

Skip creating metric descriptors if set

// We only send metric descriptors if we're configured *and* we're not sending service timeseries.
if me.cfg.MetricConfig.SkipCreateMetricDescriptor || me.cfg.MetricConfig.CreateServiceTimeSeries {
continue
}

Use this instead of CreateTimeSeries if set

if me.cfg.MetricConfig.CreateServiceTimeSeries {
err = me.createServiceTimeSeries(ctx, req)
} else {
err = me.createTimeSeries(ctx, req)
}

@frankyn
Copy link
Member

frankyn commented Apr 18, 2024

Hi @dashpole is there someone that help pick up this request on your team?

@psx95 psx95 self-assigned this Apr 18, 2024
@psx95
Copy link
Contributor

psx95 commented Apr 18, 2024

Hi @frankyn, I am picking this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants