You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I cannot add request-contextual data to my log entries.
Feature Description
I want to include per-request information to each log entry so that I do not have to rely explicitly on Transaction. As per the Same feature in the ruby agent something simple like newrelic.agent. add_custom_log_attributes() and newrelic.agent. add_custom_log_attribute() equivalents to the existingadd_custom_attribute() and add_custom_attributes() functions for Transactions. Alternatively a setting to allow transaction custom attributes to propagate to logs.
I would like to set this in my FastAPI@app.middleware("http") function much like I have been doing for add_custom_attributes() and hoping they would appear in log entries.
The direct contextual information is available in Splunk on legacy apps and we would like to rely less on that.
Alternatives
Maybe the Ruby feature isn't supporting dynamic attributes after reading this back a bit. If the logging does not manage a lifecycle like transactions do then it would be great if there was a guide for how to dynamically add attributes to certain logs with python logging and the newrelic-admin run-program agent running in our Dockerfile. is there a way to omit json logging via our app and have the outer agent understand this? Is there any other hooks? Do we have to revert to forwarding all logs manually if that's not the case and is there a guide on how to do this beginning to end with custom attributes? Or is this why Transactions exist?
I figured there must be a way if there are various contextual logging context vars optionally flushed through.
Priority
Really want
I've searched, cloned this repo and reversed-engineered, but I'm pretty sure this feature does not exist. Very happy to be corrected if it does exist.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I cannot add request-contextual data to my log entries.
Feature Description
I want to include per-request information to each log entry so that I do not have to rely explicitly on
Transaction
. As per the Same feature in the ruby agent something simple likenewrelic.agent. add_custom_log_attributes()
andnewrelic.agent. add_custom_log_attribute()
equivalents to the existingadd_custom_attribute()
andadd_custom_attributes()
functions forTransactions
. Alternatively a setting to allow transaction custom attributes to propagate to logs.I would like to set this in my
FastAPI
@app.middleware("http")
function much like I have been doing foradd_custom_attributes()
and hoping they would appear in log entries.The direct contextual information is available in Splunk on legacy apps and we would like to rely less on that.
Alternatives
Maybe the Ruby feature isn't supporting dynamic attributes after reading this back a bit. If the logging does not manage a lifecycle like transactions do then it would be great if there was a guide for how to dynamically add attributes to certain logs with python logging and the
newrelic-admin run-program
agent running in ourDockerfile
. is there a way to omit json logging via our app and have the outer agent understand this? Is there any other hooks? Do we have to revert to forwarding all logs manually if that's not the case and is there a guide on how to do this beginning to end with custom attributes? Or is this why Transactions exist?I figured there must be a way if there are various contextual logging context vars optionally flushed through.
Priority
Really want
I've searched, cloned this repo and reversed-engineered, but I'm pretty sure this feature does not exist. Very happy to be corrected if it does exist.
The text was updated successfully, but these errors were encountered: