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-1679: Move Tracer.trace out of Tracer class/interface #44

Merged
merged 2 commits into from
Apr 13, 2022

Conversation

michaelyeager-wf
Copy link
Contributor

Notes

This PR "globalizes" the trace utility method and removes it from the Tracer SDK class.

Reviewers

@Workiva/product-new-relic

@rmconsole-wf
Copy link

rmconsole-wf commented Apr 5, 2022

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): #44
Release Image Tags:

Reviewers: michaelyeager-wf, blakeroberts-wk

Additional Information

Watchlist Notifications: None
Pull Requests included in release:

	When this pull is merged I will add it to the following release:
	Current version: opentelemetry-dart 0.2.1
	Version after merge: opentelemetry-dart 1.0.0
	Release Ticket(s): O11Y-1615

	This pull is considered a release pull
	The options defined for this repo will be carried out


Note: This is a shortened report. Click here to view Rosie's full evaluation.
Last updated on Wednesday, April 13 10:21 AM CST

@michaelyeager-wf
Copy link
Contributor Author

Confirmed passing unit tests and that trace results in spans: https://onenr.io/02R5A80vrRb

QA +1

@aviary2-wf
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.

@semveraudit-wf
Copy link

semveraudit-wf commented Apr 5, 2022

Public API Changes

Recommendation: ‼️ Major version bump (fyi @Workiva/semver-audit-group )

@@ line 7: package:opentelemetry/src/sdk/trace/tracer.dart @@
class Tracer implements Tracer
-     FutureOr<R> trace<R>(String name, FutureOr<R> Function() fn, {Context context})
//    Removing a method is a major change.
@@ line 9: package:opentelemetry/src/api/trace/tracer.dart @@
abstract class Tracer
-     FutureOr<R> trace<R>(String name, FutureOr<R> Function() fn, {Context context})
//    Removing a method is a major change.
@@ line 36: package:opentelemetry/src/sdk/open_telemetry.dart @@
+  FutureOr<R> trace<R>(String name, FutureOr<R> Function() fn, {Context context, Tracer tracer})
// Adding a top-level function is a minor change.

Showing results for 266971b

Powered by semver-audit-service. Please report any problems by filing an issue.
Reported by the dart semver audit client 2.2.2
Browse public API.

Last edited UTC Apr 08 at 21:19:44

 - Moving tracer to an optional parameter.
FutureOr<R> trace<R>(String name, FutureOr<R> Function() fn,
{api.Context context, api.Tracer tracer}) async {
context ??= api.Context.current;
tracer ??= _tracerProvider.getTracer('opentelemetry-dart');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: take a tracer provider optionally and:

Suggested change
tracer ??= _tracerProvider.getTracer('opentelemetry-dart');
tracerProvider ??= _tracerProvider;
tracer ??= tracerProvider.getTracer('opentelemetry-dart');

@michaelyeager-wf
Copy link
Contributor Author

@Workiva/release-management-p

@rmconsole-wf
Copy link

@michaelyeager-wf I will not merge this because:

  • 'Semver signoff applied on latest commit of major change' is False

@blakeroberts-wk
Copy link
Contributor

We should be extra carful merging otel dart stuff right now. We need to avoid releasing 1.0 and ensure we bump minor version on breaking changes. i.e. this PR needs to be included in release 0.3.

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

@rmconsole-wf
Copy link

Could not merge pull request. For assistance, reach out to a member of Release Management in the '#support-release' Slack channel

Error: Required status check 'Aviary' is pending.

@rm-astro-wf rm-astro-wf merged commit ccc8983 into Workiva:master Apr 13, 2022
@rm-astro-wf rm-astro-wf deleted the myeager-wf/O11Y-1679 branch April 13, 2022 15:21
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