Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Don't report traces from stackdriver stats exporter #573

Closed
groob opened this issue Mar 13, 2018 · 1 comment
Closed

Don't report traces from stackdriver stats exporter #573

groob opened this issue Mar 13, 2018 · 1 comment
Assignees
Labels

Comments

@groob
Copy link
Contributor

groob commented Mar 13, 2018

In #557 it was reported that calls to v2.TraceService.BatchWriteSpans were being sent to GCP trace by default, creating a lot of noise. #560 fixed this issue for traces, but I still see it for stats.

Sent.google.monitoring.v3.MetricService.CreateTimeSeries

My code looks like this:

        exporter, err := stackdriver.NewExporter(stackdriver.Options{
                ProjectID:            *flProject,
                BundleDelayThreshold: 10 * time.Second,
        })
        if err != nil {
                logutil.Fatal(logger, "err", err)
        }
        trace.RegisterExporter(exporter)
        trace.SetDefaultSampler(trace.AlwaysSample())

        view.RegisterExporter(exporter)
        view.Subscribe(ochttp.DefaultViews...)
        view.SetReportingPeriod(1 * time.Second)
@semistrict semistrict self-assigned this Mar 13, 2018
@semistrict semistrict added the bug label Mar 13, 2018
@bogdandrutu
Copy link
Contributor

@Ramonza you should do the same thing as you did for trace.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants