ConsoleExporter to print Activity(Span) Links (#2849)
This commit is contained in:
parent
3833a4f503
commit
5a9d564405
|
|
@ -3,6 +3,7 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
Fix MetricExporter to respect Console and Debug flags.
|
Fix MetricExporter to respect Console and Debug flags.
|
||||||
|
Added `Activity.Links` support to `ConsoleActivityExporter`.
|
||||||
|
|
||||||
## 1.2.0-rc1
|
## 1.2.0-rc1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,15 @@ namespace OpenTelemetry.Exporter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (activity.Links.Any())
|
||||||
|
{
|
||||||
|
this.WriteLine("Activity.Links:");
|
||||||
|
foreach (var activityLink in activity.Links)
|
||||||
|
{
|
||||||
|
this.WriteLine($" {activityLink.Context.TraceId} {activityLink.Context.SpanId}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var resource = this.ParentProvider.GetResource();
|
var resource = this.ParentProvider.GetResource();
|
||||||
if (resource != Resource.Empty)
|
if (resource != Resource.Empty)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue