generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement HoneycombOptions (#2)
## Which problem is this PR solving? Implements `HoneycombOptions`, including `HoneycombOptions.Builder`, as per the design doc. ## Short description of the changes * If a plist file is passed into the constructor, `Builder` is pre-populated with its values. * There are setters for all values. * `HoneycombOptions` only contains specific values like `tracesEndpoint`, whereas the `Builder` has fallback settings like `setEndpoint`. The specific values are resolved when `build()` is called. * Automatic headers and resources are injected upon calling `build()`. * The only required field is `APIKey`. * Throws HoneycombOptionsError on any fatal configuration error. These should only be unexpected developer bugs, not expected runtime errors. ## How to verify that this has the expected result There are comprehensive unit tests that I believe test all plist values, setters, and fallbacks, as well as any error conditions. In review please look for the following: * Are there any missing unit test cases? * Is the fallback logic correct? * Are the resources and headers auto-populated correctly? * Should the error cases actually be error cases?
- Loading branch information
Showing
9 changed files
with
1,524 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,150 @@ | ||
{ | ||
"originHash" : "1d753dc79b1d84a6ff809fe2b0ee15d4174ecaae798abba08103061974e1908b", | ||
"pins" : [ | ||
{ | ||
"identity" : "grpc-swift", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/grpc/grpc-swift.git", | ||
"state" : { | ||
"revision" : "6a90b7e77e29f9bda6c2b3a4165a40d6c02cfda1", | ||
"version" : "1.23.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "opentelemetry-swift", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/open-telemetry/opentelemetry-swift.git", | ||
"state" : { | ||
"revision" : "0dd37c4a14a6aeeb131eea40a13cb3832c7c6a97", | ||
"version" : "1.10.1" | ||
} | ||
}, | ||
{ | ||
"identity" : "opentracing-objc", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/undefinedlabs/opentracing-objc", | ||
"state" : { | ||
"revision" : "18c1a35ca966236cee0c5a714a51a73ff33384c1", | ||
"version" : "0.5.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-atomics", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-atomics.git", | ||
"state" : { | ||
"revision" : "cd142fd2f64be2100422d658e7411e39489da985", | ||
"version" : "1.2.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-collections", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-collections.git", | ||
"state" : { | ||
"revision" : "3d2dc41a01f9e49d84f0a3925fb858bed64f702d", | ||
"version" : "1.1.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-http-types", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-http-types", | ||
"state" : { | ||
"revision" : "ae67c8178eb46944fd85e4dc6dd970e1f3ed6ccd", | ||
"version" : "1.3.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-log", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-log.git", | ||
"state" : { | ||
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537", | ||
"version" : "1.6.1" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-metrics", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-metrics.git", | ||
"state" : { | ||
"revision" : "e0165b53d49b413dd987526b641e05e246782685", | ||
"version" : "2.5.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio.git", | ||
"state" : { | ||
"revision" : "4c4453b489cf76e6b3b0f300aba663eb78182fad", | ||
"version" : "2.70.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio-extras", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio-extras.git", | ||
"state" : { | ||
"revision" : "05c36b57453d23ea63785d58a7dbc7b70ba1745e", | ||
"version" : "1.23.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio-http2", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio-http2.git", | ||
"state" : { | ||
"revision" : "b5f7062b60e4add1e8c343ba4eb8da2e324b3a94", | ||
"version" : "1.34.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio-ssl", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio-ssl.git", | ||
"state" : { | ||
"revision" : "a9fa5efd86e7ce2e5c1b6de113262e58035ca251", | ||
"version" : "2.27.1" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio-transport-services", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio-transport-services.git", | ||
"state" : { | ||
"revision" : "38ac8221dd20674682148d6451367f89c2652980", | ||
"version" : "1.21.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-protobuf", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-protobuf.git", | ||
"state" : { | ||
"revision" : "e17d61f26df0f0e06f58f6977ba05a097a720106", | ||
"version" : "1.27.1" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-system", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-system.git", | ||
"state" : { | ||
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5", | ||
"version" : "1.3.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "thrift-swift", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/undefinedlabs/Thrift-Swift", | ||
"state" : { | ||
"revision" : "18ff09e6b30e589ed38f90a1af23e193b8ecef8e", | ||
"version" : "1.1.2" | ||
} | ||
} | ||
], | ||
"version" : 3 | ||
} |
This file contains 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.