open-telemetry / opentelemetry-dotnet-contrib

This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
https://opentelemetry.io
Apache License 2.0
477 stars 283 forks source link

(Exporter/Geneva) Support ActivityEvents #342

Open cijothomas opened 2 years ago

cijothomas commented 2 years ago

Issue with OpenTelemetry.Exporter.Geneva

Is this a feature request or a bug?

var eventTags = new Dictionary<string, object?>
{
    { "foo", 1 },
    { "bar", "Hello, World!" },
    { "baz", new int[] { 1, 2, 3 } }
};
activity?.AddEvent(new("Gonna try it!", DateTimeOffset.Now, new(eventTags)));

The event above is ignored by the Exporter.

notheotherben commented 2 years ago

Hi, passing along some context on why this matters for our team:

giulianob commented 2 years ago

@cijothomas Any update on this issue? We also need events to be sent to Geneva.

NateB2 commented 1 year ago

@cijothomas - any updates? We're incorporating OpenTelemetry and not being able to export events is a major disappointment for all the reasons @notheotherben mentioned.

DeanJustus commented 1 year ago

Hi folks, any ack on future development or plans for this?

jaeyoon21 commented 1 year ago

Dear folks, @cijothomas Our project need ActivityEvents to be shown in geneva. Any update on this issue. Thanks

emmayspark commented 1 year ago

Dear team & @cijothomas, our team is also working on integrating Otel into our systems. Our current logging system uses internal SDK that is deprecating soon, and this supports Exception Telemetry. Because of the limitation of Geneva exporter, we have to find a workaround to log all exceptions manually (but still limited). We need this feature to get exceptions from instrumentation library. Hopefully this feature is considered in the upcoming planning! Thank you.

cijothomas commented 8 months ago

No update on this - i.e this is not coming in the next 6 months.

Consider the following workarounds:

  1. If you own the code which produces ActivityEvents, use ILogger instead. Logs are automatically correlated to Activity, so a similar experience to ActivityEvents can be achieved. Be aware that, ILogger logs are not subject to sampling. (but ActivityEvents are part of Activity itself, so sampling affects ActivityEvents as well)
  2. If you do not own the code which produce ActivityEvents, use an ActivityProcessor, and convert the ActivityEvents to ILogger logs.

Neither is ideal, but just shared some workarounds.

cataggar commented 3 weeks ago

I see that Activity.AddException now creates an ActivityEvent. It would be nice if they were sent to Geneva. We do control the code, so we will switch to ILogger.LogError(ex, msg).