-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat: support classic ingest keys #238
Conversation
@@ -128,9 +128,5 @@ def add_exception_data(span, exception) | |||
span.add_field("error_backtrace_limit", error_backtrace_limit) | |||
span.add_field("error_backtrace_total_length", exception.backtrace.length) | |||
end | |||
|
|||
def classic_write_key?(write_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a private method and its only use was to set the classic
instance variable on @context
.
@context.classic
is set now by asking the configuration
object directly about its classicness.
@@ -43,8 +43,41 @@ | |||
expect(configuration.write_key).to eq write_key | |||
end | |||
|
|||
describe "#classic?" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec the classicness of the various key formats once here.
@@ -61,10 +94,12 @@ | |||
|
|||
context "with a classic write key" do | |||
before do | |||
configuration.write_key = "c1a551c000d68f9ed1e96432ac1a3380" | |||
allow(configuration).to receive(:classic?).and_return(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stub the classic check within "classic" test scopes instead of repeating the matrix of key types all over again.
92fd533
to
0021bac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💎
Which problem is this PR solving?
Short description of the changes
Libhoney.classic_api_key?
method and use that method for key checking