#general

Changing OperationName for Request in .Net for SigNoz

TLDR Ognen asked about changing the operation name in .Net for SigNoz. Prashant suggested using 'StartActiveSpan' and 'UpdateName' functions through manual instrumentation.

Powered by Struct AI
2
7mo
Solved
Join the chat
May 04, 2023 (7 months ago)
Ognen
Photo of md5-ff683accec4247352a393cefd60eb805
Ognen
02:29 PM
does anyone know how to how can i change the OperationName of a certain request in .Net for signoz
May 11, 2023 (7 months ago)
Prashant
Photo of md5-1899629483c7ab1dccfbee6cc2f637b9
Prashant
05:42 PM
I suppose it depends on the instrumentation.

In case of manual instrumentation, you can set the operation name using StartActiveSpan as well as UpdateName functions as shown in below example.

https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/examples/Console/TestOTelShimWithConsoleExporter.cs#L39-L45