Conversation
|
@gamer496 can we add the command as well to the data we gather? for example: Becasue we want to geather info about which CLI commands are used |
wouldn't we get that from url path? In a much more granular way? |
@gamer496 We don't have a specific URL tied to each command, as each command can trigger multiple API calls, and some commands may share the same APIs. However, we can identify the command from the script arguments |
I understand your point. But every request will get registered as a separate metric. So clone command, for example, will trigger multiple api calls with clone header. We can discuss separately what the best way to register those commands is but I don't think it's headers. |
|
So Kei pointed me to your discussion here, I am again wondering if we need to add pendo as well on top. It would probably be nice to combine more granular custom events on pendo side with the access logs. We could additionally add a random Execution ID to each command run so that both pendo events and http request are trackable by that ID. Firebase did this and it was extremely helpful. Thoughts? |
I'm not very sure about pendo. We will take tracking commands as a separate task. For now I will merge this. |
src/utils/RestAdapter.ts
Outdated
| // Ensure headers object exists and add the custom header | ||
| httpRequest.headers = { | ||
| ...httpRequest.headers, | ||
| 'X-Cognigy-CLI-Info': cliInfoHeader, |
There was a problem hiding this comment.
@gamer496 why didn't you use User-Agent header?
src/utils/RestAdapter.ts
Outdated
| ...httpRequest.headers, | ||
| 'X-Cognigy-Client-Info': cliInfoHeader, | ||
| }; | ||
| console.log('httpRequest.headers', httpRequest.headers); |
There was a problem hiding this comment.
@gamer496 I think you forgot to remove this console.log
|
🎉 This PR is included in version 1.8.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
adding custom info header to cli requests made through cognigy client.
example header:
'X-Cognigy-CLI-Info': 'cognigy-cli/1.6.4 project/6722201409dd9dee97022b13'