Skip to content

Commit

Permalink
Updating Jaeger tags based on spec (#1513)
Browse files Browse the repository at this point in the history
* Updating Jaeger tags based on spec

* updating changelog

Co-authored-by: Cijo Thomas <[email protected]>
  • Loading branch information
eddynaka and cijothomas authored Nov 12, 2020
1 parent 6157364 commit be72b17
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

* Jaeger tags used for InstrumentationLibrary changed from library.name,
library.version to otel.library.name, otel.library.version respectively.
([#1513](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1513))

## 0.8.0-beta.1

Released 2020-Nov-5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ public static JaegerSpan ToJaegerSpan(this Activity activity)
var activitySource = activity.Source;
if (!string.IsNullOrEmpty(activitySource.Name))
{
PooledList<JaegerTag>.Add(ref jaegerTags.Tags, new JaegerTag("library.name", JaegerTagType.STRING, vStr: activitySource.Name));
PooledList<JaegerTag>.Add(ref jaegerTags.Tags, new JaegerTag("otel.library.name", JaegerTagType.STRING, vStr: activitySource.Name));
if (!string.IsNullOrEmpty(activitySource.Version))
{
PooledList<JaegerTag>.Add(ref jaegerTags.Tags, new JaegerTag("library.version", JaegerTagType.STRING, vStr: activitySource.Version));
PooledList<JaegerTag>.Add(ref jaegerTags.Tags, new JaegerTag("otel.library.version", JaegerTagType.STRING, vStr: activitySource.Version));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public void JaegerActivityConverterTest_ConvertActivityToJaegerSpan_NoLinks()
// The last tag should be library.name in this case
tag = tags[tags.Length - 1];
Assert.Equal(JaegerTagType.STRING, tag.VType);
Assert.Equal("library.name", tag.Key);
Assert.Equal("otel.library.name", tag.Key);
Assert.Equal(nameof(CreateTestActivity), tag.VStr);

var logs = jaegerSpan.Logs.ToArray();
Expand Down

0 comments on commit be72b17

Please sign in to comment.