Skip to content

Conversation

@dmehala
Copy link
Collaborator

@dmehala dmehala commented Jan 29, 2024

No description provided.

@dmehala dmehala requested review from cgilmour and dgoffredo January 29, 2024 13:29
Copy link
Contributor

@dgoffredo dgoffredo left a comment

Choose a reason for hiding this comment

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

This technique looks good. I like how it's consistent with previous use of ConfigManager.

There is the question, that you asked internally, of whether already-started traces should be allowed to be sent. A design where the answer is "no" might be better from a user perspective, but the implementation would be less elegant.

Please fix the test failure showing in CI, and also please add tests for the new behavior.

Base automatically changed from dmehala/add-rc-tags to main January 31, 2024 15:56
@dmehala dmehala force-pushed the dmehala/add-rc-trace-enabled branch from 061e775 to 139446f Compare January 31, 2024 19:59
@dmehala dmehala marked this pull request as ready for review January 31, 2024 20:00
// Return the `SpanDefaults` consistent with the most recent configuration.
std::shared_ptr<const SpanDefaults> get_span_defaults();

bool get_report_traces();
Copy link
Collaborator Author

@dmehala dmehala Jan 31, 2024

Choose a reason for hiding this comment

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

  • document (and rename?)

Copy link
Contributor

Choose a reason for hiding this comment

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

We could follow the lead of TracerConfig and omit the get_ prefix. It's fine either way.

Yes, please do add a comment here. Maybe:

// Return whether spans should be sent to the collector.

I don't like the use of the word "should." Something like that, anyway.

Copy link
Collaborator Author

@dmehala dmehala left a comment

Choose a reason for hiding this comment

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

TODO:

  • write test
  • remove null_collector.* (could be useful)

@pr-commenter
Copy link

pr-commenter bot commented Jan 31, 2024

Benchmarks

Benchmark execution time: 2024-02-01 11:04:05

Comparing candidate commit 8ad3bd3 in PR branch dmehala/add-rc-trace-enabled with baseline commit 8c3969c in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@dmehala dmehala requested a review from dgoffredo January 31, 2024 20:02
Copy link
Contributor

@dgoffredo dgoffredo left a comment

Choose a reason for hiding this comment

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

:shipit:

// Return the `SpanDefaults` consistent with the most recent configuration.
std::shared_ptr<const SpanDefaults> get_span_defaults();

bool get_report_traces();
Copy link
Contributor

Choose a reason for hiding this comment

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

We could follow the lead of TracerConfig and omit the get_ prefix. It's fine either way.

Yes, please do add a comment here. Maybe:

// Return whether spans should be sent to the collector.

I don't like the use of the word "should." Something like that, anyway.

if (tracing_enabled_it->is_boolean()) {
config_update.report_traces = tracing_enabled_it->get<bool>();
} else {
// TODO: report to telemetry
Copy link
Contributor

Choose a reason for hiding this comment

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

coming soon...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

@dmehala dmehala merged commit 6dacac2 into main Feb 1, 2024
@dmehala dmehala deleted the dmehala/add-rc-trace-enabled branch February 1, 2024 12:53
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.

3 participants