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
I am attempting to migrate a .NET console app that is using the Application Insights SDK to TrackEvent some data (which shows up in my App Insights instance as a customEvent) to OpenTelemetry. IIUC the closest thing to TrackEvent in OpenTelemetry is the Trace signal.
This is what I did before:
publicstaticvoidSendTelemetry(TelemetryEvente){varclient=CreateAppInsightsTelemetryClient(e.InstrumentationKey);client.TrackEvent(e.EventName,e.Properties,e.Metrics);client.Flush();Task.Delay(1000).Wait();// Allow time for flushing}
But when I run the code nothing appears to be sent. I've checked both customEvents and traces and neither has new data.
The Instrumentation key in TelemetryEvent is correct for my App Insights resource and works fine with the old code. I've also tried replacing that InstrumentationKey={e.InstrumentationKey} string with the Connection String value that you get from the App Insights portal--no luck with that either.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am attempting to migrate a .NET console app that is using the Application Insights SDK to TrackEvent some data (which shows up in my App Insights instance as a customEvent) to OpenTelemetry. IIUC the closest thing to TrackEvent in OpenTelemetry is the Trace signal.
This is what I did before:
Here's what I'm trying now:
But when I run the code nothing appears to be sent. I've checked both customEvents and traces and neither has new data.
The
Instrumentation
key inTelemetryEvent
is correct for my App Insights resource and works fine with the old code. I've also tried replacing thatInstrumentationKey={e.InstrumentationKey}
string with the Connection String value that you get from the App Insights portal--no luck with that either.What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions