Giter Club home page Giter Club logo

Comments (14)

ofrobots avatar ofrobots commented on August 30, 2024

/cc @lukesneeringer @stephenplusplus

from nodejs-logging-bunyan.

stephenplusplus avatar stephenplusplus commented on August 30, 2024

@lukesneeringer is there anyone we can ask from the google-gax repo? @landrito?

It appears the only option you can pass through on the request is: isBundling, which can only disable the previously hard-coded setting. I'm not sure that there's a way to override it at runtime.

Additionally/alternatively, maybe we should be using a better default value in the hardcoded file?

from nodejs-logging-bunyan.

FalconerTC avatar FalconerTC commented on August 30, 2024

Any updates or ideas on this?

from nodejs-logging-bunyan.

JustinBeckwith avatar JustinBeckwith commented on August 30, 2024

Calling @alexander-fenster :)

from nodejs-logging-bunyan.

alexander-fenster avatar alexander-fenster commented on August 30, 2024

@landrito to comment :)

from nodejs-logging-bunyan.

landrito avatar landrito commented on August 30, 2024

Hm. I filed an issue in gax-nodejs to see if dynamically setting the bundling at call time makes sense. I have a hunch that introducing the ability to override it at call time is going to introduce a lot of complexity (what do we do for calls made prior to dynamically changing the bundling, what to do for calls with different

@stephenplusplus do you think dynamically setting this at client instantiation would work to resolve this?

from nodejs-logging-bunyan.

stephenplusplus avatar stephenplusplus commented on August 30, 2024

Those concerns make sense to me. I guess we wouldn't want to open up the setting at the method level, but during instantiation of the client. If there's anything else gax uses similar to BundlingConfig, we would want to make sure those could be passed through as well.

from nodejs-logging-bunyan.

landrito avatar landrito commented on August 30, 2024

So overriding the bundle options should work at client initialization like so:

const Logging = require('@google-cloud/logging');

const clientConfigOverride = {
  "interfaces": {
    "google.logging.v2.LoggingServiceV2": {
      "methods": {
        "WriteLogEntries": {
          "bundling": {
            "element_count_threshold": {Your},
            "request_byte_threshold": {Overrides},
            "delay_threshold_millis": {Here}
          }
        }
      }
    }
  }
};

const logging = new Logging({
  clientConfig: clientConfigOverrde
});

Looking at how the logging-bunyan client is implemented, it passes the constructor opts to the logging client directly. So passing the clientConfig to the constructor of the logging-bunyan client should yield overridden bundling options.

from nodejs-logging-bunyan.

stephenplusplus avatar stephenplusplus commented on August 30, 2024

Oh, that looks like a good enough solution to me. @FalconerTC what do you think?

from nodejs-logging-bunyan.

FalconerTC avatar FalconerTC commented on August 30, 2024

This is perfect. Exactly what I am looking for. Thanks for the help.

from nodejs-logging-bunyan.

stephenplusplus avatar stephenplusplus commented on August 30, 2024

Great. I think what we need to do now is add a mention to the docs that this type of configuration is possible. @landrito is there something on the gax docs we can link to?

from nodejs-logging-bunyan.

DominicKramer avatar DominicKramer commented on August 30, 2024

@landrito Friendly ping.

from nodejs-logging-bunyan.

ofrobots avatar ofrobots commented on August 30, 2024

@DominicKramer I would suggest moving the issue (using the issue mover) to the gax-repo as the outstanding task is to update the docs.

from nodejs-logging-bunyan.

ofrobots avatar ofrobots commented on August 30, 2024

This issue was moved to googleapis/gax-nodejs#256

from nodejs-logging-bunyan.

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.