Giter Site home page Giter Site logo

Comments (7)

mitra-shan avatar mitra-shan commented on August 16, 2024 1

Hello @akantic you are fantastic. You resolved my eye bug. Yes you are correct this () was not there and failing. Thanks a lot for your support.

from treblle-node.

cindreta avatar cindreta commented on August 16, 2024 1

@akantic FTW 🤩 Thank you both, glad it's solved

from treblle-node.

cindreta avatar cindreta commented on August 16, 2024

Hey man thank you so much for the report! We're on it and we'll get it fixed soon. ✌🏻

from treblle-node.

mitra-shan avatar mitra-shan commented on August 16, 2024

Awesome @cindreta !! 👍

from treblle-node.

akantic avatar akantic commented on August 16, 2024

Hey @mitra-shan, I will try to long shot this first without much context 😅
Are you by any chance providing a wrong value for apiKey, more precisely, this function that you have pasted?

If that is not the case, could you please provide more context about this, in particular:

  1. Which integration are you using (express, koa, strapi...)?
  2. Could you provide a snippet of code where you have invoked the Treblle function (useTreblle for example)?
  3. Request data for which this error is happening, if available.

from treblle-node.

mitra-shan avatar mitra-shan commented on August 16, 2024

@akantic - I am using NodeJS and Express also the API key is correct as in my Treblle project there is another similar project with NodeJS Express in that I could see all my API calls are getting recorded. But, while I used the same code snippet like -

export const createServer = async (): Promise<Application> => {
  const app = express();

  // section treblle
  useTreblle(app, {
    apiKey: env.get('TREBLLE_API_KEY').asString,
    projectId: env.get('TREBLLE_PROJECT_ID').asString,
    additionalFieldsToMask: ['X-Api-Key', 'secret', 'private', 'user_ssn'],
  });

  console.log(' ----------------------- ', process.env.TREBLLE_PROJECT_ID);

This time it's failing at treblle however it's not blocking the code and I am able to receive the response on Postman. Also one more pointer is I am able to call the API from the test in Treblle and getting the response successfully without but, seeing the same error on my API console.

from treblle-node.

akantic avatar akantic commented on August 16, 2024

I believe you are just not invoking asString function. So try this instead:

  useTreblle(app, {
    apiKey: env.get('TREBLLE_API_KEY').asString(),
    projectId: env.get('TREBLLE_PROJECT_ID').asString(),
    additionalFieldsToMask: ['X-Api-Key', 'secret', 'private', 'user_ssn'],
  });

from treblle-node.

Related Issues (3)

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.