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
logdna.init(LOGDNA_INGESTION_KEY, {
app: "front-end",
env: "staging", // this line doesn't seem to do anything
console: false,
globalErrorHandlers: false,
sampleRate: 100,
});
For some reason in the logdna UI none of my logs for this app have an env field. It could be a misconfiguration on my end. As a workaround I've been adding an env field to the meta object of every log (using lineContext) which allows me to filter in the logdna UI by meta.env.
The text was updated successfully, but these errors were encountered:
@keanemind It is incorrectly shown in the Readme.md. The env should be added to the .addContext() object for it or any other information to be added to ever log message. I will get the docs clean up and thanks for bring this to my attention.
Ex.
logdna.addContext({
// Context is appended to the metadata of each message sent to LogDNA
// Add any custom meta data such as:
version: 'v1.0.2',
env: 'dev'.
user: {
email: 'user@email.email',
userId: '987654321',
},
});
Here is the config I am using:
For some reason in the logdna UI none of my logs for this app have an
env
field. It could be a misconfiguration on my end. As a workaround I've been adding anenv
field to the meta object of every log (usinglineContext
) which allows me to filter in the logdna UI bymeta.env
.The text was updated successfully, but these errors were encountered: