-
Notifications
You must be signed in to change notification settings - Fork 140
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
ExpressJS: Operation_Name and Operation_Id not showing in Application Insights #1360
Comments
@Cmmc13 What version of the SDK are you using? Just as a heads up, as mentioned in the documentation, operation name is not yet supported in the 3.X SDK. |
Thank you for the quick reply @JacksonWeber, I am indeed using a 3.X version. Although when I read the documentation I thought it just meant the Operation_Name field would be defaulted to a value in which case it might still be useful. |
Downgrading to v2.9.5 solved the issue, so it indeed seems to be related to Operation_Name not being supported yet. |
@Cmmc13 Can you provide some more details about the telemetry you're trying to see OperationName on? 3.x SDK should automatically populate this field so I just want to get a better idea of your use case. |
Hi @JacksonWeber, I'd like to share our experience with setting a custom operation_Id in our NestJS application. Our goal is to manually create trace logs while setting a custom operation_Id for correlating logs. Specifically, we send the operation_Id from the frontend, allowing us to link backend traces with frontend traces seamlessly. However, we encountered difficulties with version 3.x. By default, the operation_Id is empty, and I couldn't find a way to set it automatically or manually. Here's our current setup:
For logging traces, we use:
Despite trying various approaches to set the operation_Id — both manually and automatically — we haven't had any success. In contrast, version 2.x provided a straightforward solution that worked without issues:
For now, we’ve had to revert to version 2.9.6, but we’d prefer to use the latest version. If there's a preferred way to set operation_Id in version 3 that we might have missed, I'd appreciate any guidance. Thanks! |
@gausejakub The operation ID in 3.x of the SDK is just set to an OpenTelemetry traceId by default. If you're using the You mention that you try to manually set |
@gausejakub Operation ID and Operation Name are only supported on Request telemetry in v3.x of the SDK. We don't currently have support for setting it manually. We are tracking this feature though, and I can give you an update in thee case that it becomes supported in v3.x. |
Hello there,
I have a node server running expressJS, on which I am trying to add logging through Application Insights, using the following configuration and testing it locally:
This setup seems to work well, I can get every single log through the Application Insights' log search, however, they are missing some fields I usually use such as the "operation_Name" and "operation_Id".
After searching for nearly 2 days I still can't figure out if this is intentional. I did find people reporting similar issues, but in the end, none of the solutions worked. I am sure switching to azure functions would solve this issue, but is there a way to have the tracing working like it does in azure functions while using expressJS?
The text was updated successfully, but these errors were encountered: