Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

400 Errors From Stackdriver Stats Exporter  #583

@samn

Description

@samn

Running the opencensus-ext-stackdriver example results in errors when writing timeseries to Stackdriver. I was able to reproduce this in a fresh venv even when recording only two metrics.

Environment:

Python 3.6
$ pip freeze
cachetools==3.1.0
certifi==2019.3.9
chardet==3.0.4
google-api-core==1.8.2
google-auth==1.6.3
google-cloud-core==0.29.1
google-cloud-monitoring==0.31.1
google-cloud-trace==0.20.2
googleapis-common-protos==1.5.9
grpcio==1.19.0
idna==2.8
opencensus==0.3.1
opencensus-ext-stackdriver==0.1.1
protobuf==3.7.1
pyasn1==0.4.5
pyasn1-modules==0.2.4
pytz==2018.9
requests==2.21.0
rsa==4.0
six==1.12.0
urllib3==1.24.1
Traceback (most recent call last):
  File ".venv/lib/python3.6/site-packages/opencensus/common/transports/async_.py", line 105, in _thread_main
    self.exporter.emit(data)
  File ".venv/lib/python3.6/site-packages/opencensus/ext/stackdriver/stats_exporter/__init__.py", line 153, in emit
    self.handle_upload(view_data)
  File ".venv/lib/python3.6/site-packages/opencensus/ext/stackdriver/stats_exporter/__init__.py", line 165, in handle_upload
    self.upload_stats(view_data)
  File ".venv/lib/python3.6/site-packages/opencensus/ext/stackdriver/stats_exporter/__init__.py", line 177, in upload_stats
    time_series_batch)
  File ".venv/lib/python3.6/site-packages/google/cloud/monitoring_v3/gapic/metric_service_client.py", line 897, in create_time_series
    request, retry=retry, timeout=timeout, metadata=metadata
  File ".venv/lib/python3.6/site-packages/google/api_core/gapic_v1/method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File ".venv/lib/python3.6/site-packages/google/api_core/retry.py", line 270, in retry_wrapped_func
    on_error=on_error,
  File ".venv/lib/python3.6/site-packages/google/api_core/retry.py", line 179, in retry_target
    return target()
  File ".venv/lib/python3.6/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File ".venv/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.InvalidArgument: 400 One or more TimeSeries could not be written: One or more points were written more frequently than the maximum sampling period configured for the metric. {Metric: custom.googleapis.com/opencensus/task_latency_distribution, Timestamps: {Youngest Existing: '2019/03/27-10:27:48.522', New: '2019/03/27-10:27:49.523'}}: timeSeries[0]

Do you have any advice on how to proceed? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions