Add tags or context to logs based on logic

Hi,

Is it possible to add tags/context to logs once the come in based on certain logic?

For example create a name for routes based on method and path structure:

“GET” & “/dashboards/111” → “GET /dashboards/{id}”
“GET” & “/dashboards/222” → “GET /dashboards/{id}”
“POST” & “/dashboards” → “POST /dashboards”
“GET” & “/dashboards” → “GET /dashboards”
“GET” & “/dashboards?limit=50” → “GET /dashboards”
“GET” & “/dashboards/111/graphs/123” → “GET /dashboards/{id}/graps/{id}”

Thanks in advance!

Hi @kalle2

Thanks for reaching out, I hope you are well.

Sounds like you wish to have logs in context in relation to the app please see Logs in context of your app and host data | New Relic Documentation for more details.

Please let me know if my understanding is correct and if the documentation was able to support you! Should you have any additional questions or updates, please do reach out.

Hi @dcody,

Thanks. I am not looking for APM related features. Just logs that are streamed from AWS to New Relic.

Kalle

Hey @kalle2,

While I am not sure its possible to accomplish your exact goal I think this doc will help get you going with custom tags for your logs: Use tags to help organize and find your data | New Relic Documentation.

Please let us know if you were able to reach your goal with this or not and we will be more than happy to provide further assistance.

I solved it differently (before streaming it to New Relic). Thanks anyway

Hi @kalle2

Thank you for confirming you managed to fix this, delighted to hear this.

If you wish, could you share how you did this, as it will be a great benefit to other users in the community.