-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is <YOUR_METLO_COLLECTOR_URL> ? #97
Comments
HI @ZeRego curl --location --request GET 'http://localhost:8081/api/v1' So, while running on docker for local applications, you should be able to use Thanks for your suggestions. We still have to make our docs better and surface information to users more intuitively 😅 |
Running that curl from my machine returns a 200.
Do I need to change the network_mode on my app docker compose? -- Update -- Looks like using the
So setting |
That's cool ! I was going to recommend making a docker bridge in case using Okay. Right now there isn't a way to perform any debug logs. What you could try is running something like this : curl --location --request POST '<YOUR_METLO_ADDRESS>/api/v1/log-request/single' \
--header 'Authorization: <YOUR_METLO_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"url": {
"host": "test-ecommerce.metlo.com",
"path": "/cart",
"parameters": []
},
"headers": [
{
"name": "X-API-KEY",
"value": "e31f84ba-d92a-419b-b7ba-ef5e9df982f1"
}
],
"method": "POST",
"body": ""
},
"response": {
"status": 200,
"headers": [
{
"name": "content-type",
"value": "application/json; charset=utf-8"
}
],
"body": "{\"ok\": true, \"cart_uuid\": \"c423daed-9213-40ff-8fff-4691d840e290\", \"msg\": \"New Cart.\"}"
},
"meta": {
"environment": "production",
"incoming": true,
"source": "17.99.145.104",
"sourcePort": 17319,
"destination": "76.47.25.189",
"destinationPort": 443
}
}' This is a known good example, and should help us diagnose if the issue is in the credentials or metlo for node. |
We already have that part. You can check my commit and branch: I double checked the env variables are correct and I get the log: |
Running that curl from my container worked and I can see the Metlo dashboard updated. That means the key and host are correct and the problem must be in my code or in the metlo library. 🤔 |
My bad, I didn't notice that you were running on node. I have amended the response as such. As for the second thing,
Looking at the commit you mentioned, can you try importing and initializing metlo before express ? I think that's the issue here. Metlo ingestor needs to intercept traces in express and to properly capture those, we need metlo to be |
That doesn't seem code friendly😞
After disabling the eslint I was able to get just 2 requests, out hundreds, logged in Metlo. And I can see that is not picking up the correct route paths. We have our routes broken down across multiple files so I suppose you only pick the last part of the path.
|
Hey @ZeRego sorry about that! We have a fix ready here: #101 . I'll let you know when we deploy the new version. Apologies again for the back and forth, that was a really dumb bug... We're fairly new so we're still ironing out the quirks. Also, thanks for all the feedback! We'll incorporate it all in our docs and setup process in the next few days... |
Also I'd love to get on a call to get any other feedback you have :) Let me know if you'd be up for it! |
Hey @ZeRego, We've updated our metlo package, and it should be able to capture all the routes. Let us know if there are any other issues you encounter. We'll do our best to fix them asap 😃 |
Hey @ZeRego, let us know if there's any other ways we can help you or improve metlo. In the meantime, I'll be closing this issue. |
Hi there 👋
I setup Metlo locally using docker compose ( read me instructions ).
I'm also running my local app via docker compose and followed your intructions for a node connection.
First problem/question
Can't find in your docs what the
YOUR_METLO_COLLECTOR_URL
should be.From looking at your docker compose file it looks like collector is also an alias for injestor and looking at the node library the value expected is just the host.
Not sure if I can just pass the host or also need to include the port for the injestor (8081).
Suggestion:
YOUR_METLO_COLLECTOR_URL
value when the user is on the connections page or when creating a keySecond problem/question
Since I'm running both apps in docker I can't point to localhost. I tried using
http://host.docker.internal
but without success. Do you know what I should set as theYOUR_METLO_COLLECTOR_URL
in my case?The text was updated successfully, but these errors were encountered: