-
Notifications
You must be signed in to change notification settings - Fork 267
feat: Explicit bucket boundary advisory parameter #1703
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
Open
kaylareopelle
wants to merge
20
commits into
open-telemetry:main
Choose a base branch
from
kaylareopelle:metrics-advisory-parameters
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
52df452
feat: Add histogram explicit_bucket_boundaries advice
kaylareopelle 1d5c3be
Merge branch 'main' of github.com:open-telemetry/opentelemetry-ruby i…
kaylareopelle c728868
chore: Rubocop
kaylareopelle 852aed5
Set default arg for advice to nil
kaylareopelle ebd9747
test: Move test from api to sdk
kaylareopelle b9e8d37
chore: Rubocop
kaylareopelle 0a474ef
feat: Use nil instead of {} as advice default
kaylareopelle b723b2c
test: Update assertion
kaylareopelle a94e1b6
Merge branch 'main' into metrics-advisory-parameters
kaylareopelle 7223931
test: Fix assertion deprecation warning
kaylareopelle ba14270
Merge branch 'metrics-advisory-parameters' of github.com:kaylareopell…
kaylareopelle 8b56502
test: Update attributes assertion
kaylareopelle 9e8471d
feat: Update advice default arg and ivar assign
kaylareopelle d2318b0
feat: Use an empty frozen hash as default advice
kaylareopelle ed4ceca
Revert "feat: Use an empty frozen hash as default advice"
kaylareopelle bcb1caf
Revert "Revert "feat: Use an empty frozen hash as default advice""
kaylareopelle 7432bf5
Merge branch 'main' into metrics-advisory-parameters
kaylareopelle b50615d
chore: Rubocop trailing whitespace
kaylareopelle 86407fd
test: Refactor new test to match data model
kaylareopelle 7544629
Merge branch 'main' into metrics-advisory-parameters
kaylareopelle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,22 @@ module OpenTelemetry | |
module Internal | ||
# @api private | ||
class ProxyInstrument | ||
def initialize(kind, name, unit, desc, callable) | ||
def initialize(kind, name, unit, desc, callable, advice = nil) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, |
||
@kind = kind | ||
@name = name | ||
@unit = unit | ||
@desc = desc | ||
@callable = callable | ||
@advice = advice | ||
@delegate = nil | ||
end | ||
|
||
def upgrade_with(meter) | ||
@delegate = case @kind | ||
when :counter, :histogram, :up_down_counter | ||
when :counter, :up_down_counter | ||
meter.send("create_#{@kind}", @name, unit: @unit, description: @desc) | ||
when :histogram | ||
meter.send("create_#{@kind}", @name, unit: @unit, description: @desc, advice: @advice) | ||
when :observable_counter, :observable_gauge, :observable_up_down_counter | ||
meter.send("create_#{@kind}", @name, unit: @unit, description: @desc, callback: @callback) | ||
end | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.