-
Notifications
You must be signed in to change notification settings - Fork 14
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
Default Context not being attached to logs. per documentation #74
Comments
Looking at the message in the screen shot, it appears that this isnt an issue with the context not being captured but the line parser not being able to parse the data. Here is more information https://docs.mezmo.com/docs/log-parsing |
yes it is a parsing error. i have tested removing the optional params, my additional context for user. it seems since i am not providing any additional meta data or context i still receive this error from the default context provided by the package. |
this was the context i was attempting to use: i tried varying variable name from userName, userEmail etc they all seem to fail even though all the values are always strings. where the calues must be of type ContextT: this is me logging my context object in logdna: everything is consistently strings. so it is unclear to me the current issue with parsing. no additional context provided by my app with the add context useEffect commented out: |
If you look at the first screen shot, it appears that you are attempting to add the string |
so i have waited over 24hrs. saw the logs and the context work but then it stops. I am unsure how more consistent i can be with the context i am adding to always be strings. is the app wide issue? so if the issue is happening inconsistently with the types in dev, qa, beta, staging, production it would then break all the environments and wouldn't be fixed unless fixed in all the environments? useEffect(() => {
if (auth.user && auth.user.email && auth.user.name && auth.isAuthenticated && !auth.isLoading) {
logdna.clearContext();
const logDnaContext = {
env: `${CONFIG.env}`,
app: 'Tradeweb-User-Interface',
userName: `${auth.user.name}`,
userEmail: `${auth.user.email}`
}
logdna.addContext(logDnaContext);
console.log('logdna add context', logDnaContext);
} else {
logdna.clearContext();
const logDnaContext = {
env: `${CONFIG.env}`,
app: 'Tradeweb-User-Interface',
userName: `Not User`,
userEmail: `No User`
}
logdna.addContext(logDnaContext);
console.log('logdna add context', logDnaContext);
}
}, [auth.user, auth.isAuthenticated, auth.isAuthenticated]) |
i create a new key and app name for me to test this out but i am still running into issues. like this: |
I believe this index is for the entire account and not based on the specific key, host name or app name. I will double check this and let you know if that is incorrect. |
Issue Report: LogDNA Browser Logging
Description
There is an issue with the logging mechanism in the LogDNA browser integration. The logs occasionally fail to capture the default context, including location, user information, environment, etc.
Example Log
LogDNA Initialization Code
Automatically Added Context (from documentation)
Expected Behavior
The logs should consistently capture the default context, including location, user information, environment, etc.
The text was updated successfully, but these errors were encountered: