Coder Social home page Coder Social logo

Correlation Id Token about laabr HOT 10 CLOSED

felixheck avatar felixheck commented on September 6, 2024
Correlation Id Token

from laabr.

Comments (10)

felixheck avatar felixheck commented on September 6, 2024 1

Released as v2.2.3

Thanks for your issue!
BTW: I handled the mergeHapiLogData in this release as well.

from laabr.

felixheck avatar felixheck commented on September 6, 2024

Hey Andrew (@stout01), thanks for your request.

First of all options.hapiPino.mergeHapiLogData does not work currently. It's disabled internally because the token :message needs the data nested in the message property of the logged message. If that's an additionally need, just push another issue or in best case a PR :)

Next: is it possible that I take a look on your project?
I'm really wondering because all those scenarios are captured with unit tests.
Additionally I added temporarily the line laabr.format('response', '>> :cid <<'); to examples/correlator.js:

image

Works for me.

from laabr.

stout01 avatar stout01 commented on September 6, 2024

I created a quick example app where I am still having the issue.

https://github.com/stout01/HapiLoggingExample

from laabr.

felixheck avatar felixheck commented on September 6, 2024

image

What's your npm/node version? And what's your OS?

from laabr.

stout01 avatar stout01 commented on September 6, 2024

Windows 7
node: v8.1.1
npm: v5.3.0

from laabr.

felixheck avatar felixheck commented on September 6, 2024

Installed node v8.1.1 & npm v5.3.0: works on macOS like a charm.
do you work w/ windows?

image

from laabr.

stout01 avatar stout01 commented on September 6, 2024

My work machine is windows 7...

Maybe I'm missing something, but your screen shot only shows the header once. The way I have the format line setup, it should show the x-request-id header twice in the log statement.

from laabr.

felixheck avatar felixheck commented on September 6, 2024

Nope, it shows the correlation id stored in the continuation-local-storage.
The dash in the middle is the request header field x-request-id. This is just truthy if you send a respective header:
image

image

But yeah, you are right. There something wrong when using curl.
When using cocoa it works o.O It's necessary to send an additional accept-encoding header with the value/s gzip and/or deflate. Don't know why, gonna investigate.

@stout01 I asked some of the hapi core devs for help...I'm not really familiar with the compression logic in hapi. If there's no reply until tomorrow, I'll publish a hotfix.

from laabr.

felixheck avatar felixheck commented on September 6, 2024

There's a release branch (https://github.com/felixheck/laabr/tree/release/2.2.3) containing the hotfix. would be nice if you could test it again in your environment but it should work :)

I'll release it just after I get the feedback.

from laabr.

stout01 avatar stout01 commented on September 6, 2024

Perfect. Its working as expected now. Thanks for being so on top of it!

from laabr.

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.