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

Release v0.9.1 (deduplicated metrics and CreateTimeSeriesRequests)

Compare
Choose a tag to compare
@odeke-em odeke-em released this 22 Jan 22:01
· 149 commits to master since this release
0e2df90

With these release, we've fixed a years-long standing issue in which uploading duplicate metrics within the same TimeSeries would cause this kind of error

err: rpc error: code = InvalidArgument desc = One or more TimeSeries could not be written:
Field timeSeries[?] had an invalid value: Duplicate TimeSeries encountered.
Only one point can be written per TimeSeries per request.: timeSeries[?]

By duplicate metrics, meaning those metrics that share the same "Type"/"Name" e.g. for illustrative purposes

{
    "name": "projects/census-demos",
    "time_series": [
        {
            "metric": {
                "type": "custom.googleapis.com/opencensus/oce/dev/latency"
            },
            "points": [<points...>]
        },
        {
            "metric": {
                "type": "custom.googleapis.com/opencensus/oce/dev/latency"
            },
            "points": [<other_points...>]
        }
    ]
}

which had plagued even the view.Exporter aka OpenCensus StatsExporter from day 1.

With the PR #74 to fix issue #73, there is a deduplication process that prevents putting duplicated Metrics in the same CreateTimeSeriesRequest.

The above issue #73 was exacerbated when Stackdriver Metrics exporter was added to the OpenCensus Agent and metrics were streamed in from various sources concurrently.