ExportFormatter.FormatMany(IEnumerable<Activity>, Resource) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Formats a collection of Activity spans into an OTLP JSON payload compatible with the Agent 365 Observability ingestion service.
public static string FormatMany(System.Collections.Generic.IEnumerable<System.Diagnostics.Activity> activities, OpenTelemetry.Resources.Resource resource);
static member FormatMany : seq<System.Diagnostics.Activity> * OpenTelemetry.Resources.Resource -> string
Public Shared Function FormatMany (activities As IEnumerable(Of Activity), resource As Resource) As String
Parameters
- activities
- IEnumerable<Activity>
The collection of Activity spans to be formatted into the OTLP payload.
- resource
- OpenTelemetry.Resources.Resource
The OpenTelemetry resource associated with the spans, containing resource attributes.
Returns
A JSON string representing the OTLP payload for the provided activities and resource.