Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O11Y-992: OTEL Dart: Implement OTLP HTTP Reporter #6

Merged
merged 4 commits into from
Aug 25, 2021

Conversation

tylersnavely-wf
Copy link
Contributor

This introduces the collector exporter.

An example setup would look like this:

final exporter = CollectorExporter(Uri.parse('https://h.wk-dev.wdesk.org/s/opentelemetry-collector/v1/traces'));
final provider = TracerProvider(processors: [BatchSpanProcessor(exporter)]);
final Tracer tracer = provider.getTracer('my-app', version: '0.1.0');

Notes:
Because this requires generated protobuf code, I've added the protobuf definitions as a submodule, and made make init generate the files.

@rmconsole-wf
Copy link

rmconsole-wf commented Aug 24, 2021

Merge Requirements Met ✅

Request Rosie to automerge this pull request by including @Workiva/release-management-p in a comment.

General Information

Ticket(s):

Code Review(s): #6
Release Image Tags:

Reviewers: tylerrinnan-wf, blakeroberts-wk, tylersnavely-wf

Additional Information

Watchlist Notifications: None

	When this pull is merged I will add it to the following release:
	Version: opentelemetry-dart 0.1.0
	Release Ticket(s): None


Note: This is a shortened report. Click here to view Rosie's full evaluation.
Last updated on Wednesday, August 25 01:57 PM CST

@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

resource: Resource(attributes: [
KeyValue(
key: 'service.name',
value: AnyValue(stringValue: spans[0].tracer.name))
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than give a span the whole tracer, I think it makes sense to give the span resource and instrumentationLibrary attributes which can be serialized. This would be inline with the js version: https://github.com/open-telemetry/opentelemetry-js/blob/30733df5cbddb8bc60da5bc7a65f25a182f036d8/packages/opentelemetry-exporter-collector/src/transform.ts#L305-L324

Copy link
Contributor

Choose a reason for hiding this comment

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

mostly so we don't expose the api tracer.startSpan().tracer.StartSpan()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! We should correct this once https://jira.atl.workiva.net/browse/O11Y-994 is completed. I believe that has some work to include Resources, so we can easily adjust afterward.

@tylersnavely-wf
Copy link
Contributor Author

QA +1

@tylersnavely-wf
Copy link
Contributor Author

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@rmconsole7-wk rmconsole7-wk merged commit 587cb9c into master Aug 25, 2021
@rmconsole7-wk rmconsole7-wk deleted the collector-exporter branch August 25, 2021 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants