Skip to content

Conversation

@rajkumar-rangaraj
Copy link
Member

Fixes #721 .

Changes

Add ActivityExporter for Zipkin. Used same patterns already in the Zipkin Exporter and enabled exporter to transform Activity into Zipkin spans. Used CreateTestActivity as in JaegerActivity Exporter.

Checklist

  • I ran Unit Tests locally.

@rajkumar-rangaraj rajkumar-rangaraj requested a review from a team June 17, 2020 23:58
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 17, 2020

CLA Check
The committers are authorized under a signed CLA.

return timestamp.ToUnixTimeMilliseconds() * 1000;
}

internal static long ToEpochMicroseconds(this DateTime utcDateTime)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cijothomas @CodeBlanch I think this might be a good function to move to a shared file (and use links to share across multiple projects)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reyang Sounds good to me. I think @eddynaka is adding the file on #732 so we'll just need to link & use in Zipkin.

state.RemoteEndpointServiceName = strVal;
state.RemoteEndpointServiceNamePriority = priority;
}
else if (key == Resource.ServiceNameKey)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, wonder if "if-else" or a dict/hash look up would be more performant. Probably won't matter as it is not on the hot path.

{
try
{
await this.SendBatchActivityAsync(batchActivity).ConfigureAwait(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part needs to be revisited since it doesn't seem to be deterministic. Not a blocker for this PR though.

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general. The time/duration precision part seems to be in question. I've also left some non-blocking comments. I approve assuming the precision issue will be fixed.

Copy link
Member

@CodeBlanch CodeBlanch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajkumar-rangaraj If you have the bandwidth it might be useful to add ZipActivityExporter_ExportAsync benchmark next to...

public async Task ZipkinExporter_ExportAsync()

...so we can run a quick comparison of the two for perf regressions?

@cijothomas cijothomas merged commit bbf68f6 into open-telemetry:master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ActivityExporter for Zipkin

4 participants