GithubHelp home page GithubHelp logo

Comments (5)

mayurkale22 avatar mayurkale22 commented on August 23, 2024

Copying discussion from OpenCensus PR census-instrumentation/opencensus-java#2017 (comment):

The only concern that I still have is what it looks like in the dashboards when there are multiple different instances of a SessionPool with the same label values. I understand that it won't cause any errors in the client library, but how is it presented to the user? This situation would occur when an application is opening two connections to the same database with different SessionPoolOptions. This would also mean different values for constant metrics like MaxSessions.

from java-spanner.

mayurkale22 avatar mayurkale22 commented on August 23, 2024

(Thinking out loud) This is a great point. Yes, you're correct, it won't cause any errors in the client library, but as we are having same label values for multiple database clients for the same database (w/ different SessionPoolOptions), the collected metrics would mix with each other and would look messy. Also, it would be challenging/impossible for the users to make any sense of it. I am not sure how to handle this scenario, please let me know if you have any suggestion.

+@rghetia

from java-spanner.

rghetia avatar rghetia commented on August 23, 2024

One option is to create two more labels.

  1. SessionPoolID - UUID for each sessionPool.
  2. SessionPoolOptionHash - Hash value computed from all session options.

/1 allows to keep all stats separate.
/2 allows to group stats on the backend (stackdriver) with same options (if hash has no collision).

Users could customize their views to include /1 and/or /2 as necessary.

from java-spanner.

olavloite avatar olavloite commented on August 23, 2024

One option is to create two more labels.

  1. SessionPoolID - UUID for each sessionPool.
  2. SessionPoolOptionHash - Hash value computed from all session options.

/1 allows to keep all stats separate.
/2 allows to group stats on the backend (stackdriver) with same options (if hash has no collision).

Users could customize their views to include /1 and/or /2 as necessary.

That sounds reasonable to me. The only thing that concerns me a little bit is that a user will have no idea which SessionPoolID and which SessionPoolOptionHash values belong to which client, so if there's a problem, it will still be very difficult to figure out which client is causing the problem. Or is there some way that a user can set something like an ApplicationID or ClientID in OpenCensus, which indicates 'these metrics are all coming from this application/client'?

from java-spanner.

rghetia avatar rghetia commented on August 23, 2024

That sounds reasonable to me. The only thing that concerns me a little bit is that a user will have no idea which SessionPoolID and which SessionPoolOptionHash values belong to which client, so if there's a problem, it will still be very difficult to figure out which client is causing the problem. Or is there some way that a user can set something like an ApplicationID or ClientID in OpenCensus, which indicates 'these metrics are all coming from this application/client'?

Ideally, it would be nice if user provides such metadata as part of creating client-connection/session-pool which can then be used as regular label just like SessionPoolID (above). Not sure if such metadata exists.
In the absence of such metadata, application-owners could use constant labels. Not ideal as it requires one more thing to do for the app-owners.

from java-spanner.

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.