question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to push metrics to Stackdriver with short step interval and large batch size

See original GitHub issue

Hi, I’m using micrometer version 1.1.3 and spring boot 2.1.0.RELEASE. StackdriverMeterRegistry is defined as a spring bean :

@Bean
  public static StackdriverMeterRegistry stackdriver() {
    return StackdriverMeterRegistry.builder(new StackdriverConfig() {
      @Override
      public String projectId() {
        return "test-project";
      }

      @Override
      public String get(String key) {
        return null;
      }

      @Override
      public Duration step() {
        return Duration.ofSeconds(5);
      }
    }).build();
  }

However, when I ran the app on GCP I keep seeing the following warning without any stacktrace : failed to send metrics to stackdriver: INTERNAL: http2 exception

It’s strange because I can push metrics from the same application and environment using just google-cloud-monitoring library: https://cloud.google.com/monitoring/docs/reference/libraries#client-libraries-usage-java

Could you please let me know if I’m missing something in configuration etc.

Thanks, Gleb

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AQS-DTheukecommented, Aug 17, 2022

I found the solution for me. I have to add custom tags to the metrics to ensure that these are unique across services/instances:

management:
  metrics:
    tags:
      app: my-unique-service-label
      instance: ${random.uuid}

See also:

1reaction
LukeDefeocommented, Apr 13, 2020

Im also facing this issue, one of my buckets is negative. I did a little debugging like so:


 if (latencyNanos < 0) {
        print(s"got latency < 0 ${latencyNanos} ${name}" )
      }

      Timer
        .builder("akka.streams.upstreamlatency")
        .tags("step", name)
        .sla(Micrometer.timerPercentiles: _*)
        .description("Difference between a push and the last pull, gives a reading of how much time the upstream takes to produce an element after it's been requested")
        .register(micrometer)
        .record(latencyNanos, TimeUnit.NANOSECONDS)

And im definately not sending negative values in, somehow in the conversions the values are becoming negative

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cloud Monitoring metric export | Cloud Architecture Center
With the Monitoring API you can aggregate the metric values across a given alignment period by using the project. timeseries.
Read more >
Error pushing custom metric to Google Stackdriver
I'm getting the following error while trying to push custom metrics from my code to Google Stackdriver. I'm using the Java SDK.
Read more >
Practice these Questions for Google Cloud Certified ... - Medium
BigQuery, because it is designed for large-scale processing of ... Your company pushes batches of sensitive transaction data from its ...
Read more >
Remote Write Metadata propagation - Google Groups
Firstly: Thanks a lot for sharing the dev summit notes, they are greatly appreciated. ... make metrics metadata available at ingestion time to...
Read more >
Cloud Operations and Monitoring on GCP
Google Cloud Platform offers Stackdriver, a comprehensive set of services for ... Unlike metrics that are collected at regular intervals, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found