Coder Social home page Coder Social logo

Comments (7)

meltsufin avatar meltsufin commented on June 3, 2024 1

@nkubala has anyone successfully implemented this test from your common integration testing framework?

from openjdk-runtime.

balopat avatar balopat commented on June 3, 2024 1

@nkubala I created a PR to tackle these: GoogleCloudPlatform/runtimes-common#306

from openjdk-runtime.

nkubala avatar nkubala commented on June 3, 2024

has anyone successfully implemented this test from your common integration testing framework?

@meltsufin @balopat I wrote the sample integration test application for Python myself, so you can use that as an example if you run into issues. Here's the monitoring test: https://github.com/GoogleCloudPlatform/python-runtime/blob/master/tests/integration/server.py#L140

from openjdk-runtime.

balopat avatar balopat commented on June 3, 2024

thanks @nkubala based on what I see there is no significant difference from my implementation.
The 400 error seems like a timing issue, it takes a long time for Stackdriver to actually expose the new custom metric, and even the 80 seconds are not enough sometimes (8s x 10 retry). I'm wondering if the creation of a new metric at every request is necessary? I'd think that not having to create the new metric would speed things up, and would still count as a good integration test as long as we write the unique token into the timeseries.
If we don't do that, then I'd have to resort to waiting until the metric is created in the test app code.

from openjdk-runtime.

nkubala avatar nkubala commented on June 3, 2024

@balopat creating a new metric descriptor isn't necessary, but thought it would be a valid component of the test. if it's totally blocking your test from passing then we can revisit it, but I'd rather not make that change as other runtimes have been able to write the metrics successfully. could you maybe come up with a lower bound on the wait time for the metric to propagate to Stackdriver, and then we can just up the wait time in the test?

from openjdk-runtime.

balopat avatar balopat commented on June 3, 2024

@nkubala I am working on a test suite to narrow down the issues with the StackDriver monitoring when creating a metric - sometimes even the 80 seconds are not enough, when I start reading "too quickly" after the metric was created. This suggests that creating new metrics is a "heavy" operation and can interfere with subsequent reads within a certain "cool down period", while with an already created metric I had absolutely no problem.
But there is another (minor) problem with custom metrics: there is a quota policy for custom metrics - which I'm not sure everyone is aware of and would cause surprises down the line unless we setup cleanup logic for them.

from openjdk-runtime.

nkubala avatar nkubala commented on June 3, 2024

Yeah I think the main issue with the reading of the metric is that the propagation time/time it takes to flush the writes to Stackdriver varies greatly, so I think that sufficiently increasing the timeout there should probably solve that problem.

As for the quota, yeah that's something we'll need to address. We should probably just cleanup the metric descriptors we create in the tests. #302

from openjdk-runtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.