Hi Stuart
We talked about this a little bit and I decided the best way to go was a new API
call so the application programmer wouldn't have to be aware of any custom
semantics we had to specify that a given parameter should be sent to the server.
Thanks,
Neal
Is it worth making it so that anything in the creation dictionary (e.g., plist)
that starts with the prefix will be sucked in automatically so that people can
put static custom values in the plist?
http://breakpad.appspot.com/8002/diff/1008/1012
File client/mac/Framework/Breakpad.h (right):
http://breakpad.appspot.com/8002/diff/1008/1012#newcode91
Line 91: #define BREAKPAD_URL_PARAMETER_PREFIX "BreakpadServerParameter_"
"URL" doesn't seem like the right term (what URL? Is it really a URL parameter,
rather than post data? etc.). I'd say SERVER is probably better to use
everywhere you currently have URL.
http://breakpad.appspot.com/8002/diff/1008/1012#newcode215
Line 215: // parameters are sent to the server.
This is a bit confusing if you don't already know what it's for. Maybe "This
prefix is used to indicate which parameters other than those listed above that
should be uploaded to the server."?
http://breakpad.appspot.com/8002/diff/1008/1012#newcode244
Line 244: // to the crash server. They will be automatically URL encoded for
I would just leave this more vague ("They will be automatically be encoded as
necessary") so it's less about specific implementation.
http://breakpad.appspot.com/8002/diff/1008/1012#newcode250
Line 250: // This method will remove a previously-added parameter to the URL
s/to/from/, remove the world "URL"
http://breakpad.appspot.com/8002/diff/1008/1010
File client/mac/sender/crash_report_sender.h (right):
http://breakpad.appspot.com/8002/diff/1008/1010#newcode72
Line 72: NSMutableDictionary *extraURLVars_; // A dictionary containing
Again, s/URL/Server (in both the name and the comment).
http://breakpad.appspot.com/8002/diff/1008/1011
File client/mac/sender/crash_report_sender.m (right):
http://breakpad.appspot.com/8002/diff/1008/1011#newcode678
Line 678: - (BOOL)setURLParametersFromDictionary:(NSMutableDictionary
*)crashParameters {
s/URL/Server/. Also, while you are renaming it, I would expect a method called
fooFromDictionary:(NSDictionary*)aDictionaryArgument to use the argument as
input, and get something from it (it confused me yesterday when I saw it called,
and I had to go read the implementation to see what it did). How about
populateServerParameterDictionary:?
http://breakpad.appspot.com/8002/diff/1008/1011#newcode702
Line 702: // Now, add the parameters that were custom added by the
Remove "custom"
http://breakpad.appspot.com/8002/diff/1008/1011#newcode718
Line 718: - (void)addCrashDumpValue:(id)value forKey:(NSString *)key {
The name doesn't make it clear that it's about the server; how about
addServerParamaterWithValue:forKey:?
http://breakpad.appspot.com/8002/diff/1008/1009
File client/mac/testapp/Controller.m (right):
http://breakpad.appspot.com/8002/diff/1008/1009#newcode238
Line 238: @"BuildID",
Maybe use something that isn't so similar to one of the explicit preset keys?
Hi Stuart
COmments addressed, and I also added a way to add server parameters statically
in the plist file(and the client doesn't even have to use our ugly prefix, too)
http://breakpad.appspot.com/8002/diff/1008/1012
File client/mac/Framework/Breakpad.h (right):
http://breakpad.appspot.com/8002/diff/1008/1012#newcode91
Line 91: #define BREAKPAD_URL_PARAMETER_PREFIX "BreakpadServerParameter_"
On 2009/04/22 19:38:35, stuart.morgan wrote:
> "URL" doesn't seem like the right term (what URL? Is it really a URL
parameter,
> rather than post data? etc.). I'd say SERVER is probably better to use
> everywhere you currently have URL.
Done.
http://breakpad.appspot.com/8002/diff/1008/1012#newcode215
Line 215: // parameters are sent to the server.
On 2009/04/22 19:38:35, stuart.morgan wrote:
> This is a bit confusing if you don't already know what it's for. Maybe "This
> prefix is used to indicate which parameters other than those listed above that
> should be uploaded to the server."?
Done.
http://breakpad.appspot.com/8002/diff/1008/1012#newcode244
Line 244: // to the crash server. They will be automatically URL encoded for
On 2009/04/22 19:38:35, stuart.morgan wrote:
> I would just leave this more vague ("They will be automatically be encoded as
> necessary") so it's less about specific implementation.
Done.
http://breakpad.appspot.com/8002/diff/1008/1012#newcode250
Line 250: // This method will remove a previously-added parameter to the URL
On 2009/04/22 19:38:35, stuart.morgan wrote:
> s/to/from/, remove the world "URL"
Done.
http://breakpad.appspot.com/8002/diff/1008/1010
File client/mac/sender/crash_report_sender.h (right):
http://breakpad.appspot.com/8002/diff/1008/1010#newcode72
Line 72: NSMutableDictionary *extraURLVars_; // A dictionary containing
On 2009/04/22 19:38:35, stuart.morgan wrote:
> Again, s/URL/Server (in both the name and the comment).
Done.
http://breakpad.appspot.com/8002/diff/1008/1011
File client/mac/sender/crash_report_sender.m (right):
http://breakpad.appspot.com/8002/diff/1008/1011#newcode678
Line 678: - (BOOL)setURLParametersFromDictionary:(NSMutableDictionary
*)crashParameters {
On 2009/04/22 19:38:35, stuart.morgan wrote:
> s/URL/Server/. Also, while you are renaming it, I would expect a method called
> fooFromDictionary:(NSDictionary*)aDictionaryArgument to use the argument as
> input, and get something from it (it confused me yesterday when I saw it
called,
> and I had to go read the implementation to see what it did). How about
> populateServerParameterDictionary:?
Done.
http://breakpad.appspot.com/8002/diff/1008/1011#newcode702
Line 702: // Now, add the parameters that were custom added by the
On 2009/04/22 19:38:35, stuart.morgan wrote:
> Remove "custom"
Done.
http://breakpad.appspot.com/8002/diff/1008/1011#newcode718
Line 718: - (void)addCrashDumpValue:(id)value forKey:(NSString *)key {
On 2009/04/22 19:38:35, stuart.morgan wrote:
> The name doesn't make it clear that it's about the server; how about
> addServerParamaterWithValue:forKey:? the 'withValue' felt off to me.
how about addServerParameter:forKey: ?
http://breakpad.appspot.com/8002/diff/1008/1009
File client/mac/testapp/Controller.m (right):
http://breakpad.appspot.com/8002/diff/1008/1009#newcode238
Line 238: @"BuildID",
On 2009/04/22 19:38:35, stuart.morgan wrote:
> Maybe use something that isn't so similar to one of the explicit preset keys?
Done.
The new approach to custom plist keys is much cleaner :) http://breakpad.appspot.com/8002/diff/4017/4022 File client/mac/Framework/Breakpad.h (right): ...
Addressed comments, and added a unit test file for the Breakpad class http://breakpad.appspot.com/8002/diff/4017/4022 File client/mac/Framework/Breakpad.h ...
http://breakpad.appspot.com/8002/diff/5033/5040 File client/mac/Framework/Breakpad.h (right): http://breakpad.appspot.com/8002/diff/5033/5040#newcode86 Line 86: // parameters without having to rebuild Breakpad Should ...
Comments addressed.
Stuart I believe this change will now break the BuildId hack I added before to
support Sorroco; you should be able to "do it right" with the new
BreakpadAddUploadParameter API.
Neal
http://breakpad.appspot.com/8002/diff/5033/5040
File client/mac/Framework/Breakpad.h (right):
http://breakpad.appspot.com/8002/diff/5033/5040#newcode86
Line 86: // parameters without having to rebuild Breakpad
On 2009/06/03 17:24:03, jeremy wrote:
> Should this TODO be removed seeing as this CL has a separate API for setting
> Breakpad internal and user parameters?
Done.
http://breakpad.appspot.com/8002/diff/5033/5040#newcode187
Line 187: // should be uploaded to the server.
On 2009/06/03 17:24:03, jeremy wrote:
> Could you expand on this comment a bit, also an edit to the documentation
might
> be good once this CL is in :)
Done.
http://breakpad.appspot.com/8002/diff/5033/5040#newcode236
Line 236: // Breakpad).
On 2009/06/03 17:24:03, jeremy wrote:
> How about reworking this comment a bit:
> Breakpad uses the same dictionary internally to specify it's internal
> configuration parameters and parameters a client program wishes to send to the
> server. This string is used internally by Breakpad to prefix user-supplied
> parameter names so those can be sent to the server without leaking Breakpad's
> internal values.
Done.
http://breakpad.appspot.com/8002/diff/5033/5040#newcode259
Line 259: // if more than this number are set.
On 2009/06/03 17:24:03, jeremy wrote:
> Does the 64 key/value pair limit include Breakpad's internal paramaters?
Unfortunately, yes. Since the number of server parameters is generally pretty
small, I added a TODO for now to separate the two dictionaries.
http://breakpad.appspot.com/8002/diff/5033/5040#newcode262
Line 262: void BreakpadSetKeyValue(BreakpadRef ref, NSString *key, NSString
*value);
On 2009/06/03 17:24:03, jeremy wrote:
> I'm concerned that the API is a bit confusing, could you add some more
comments
> to the UploadParameter* methods or rename the keyvalue methods to make it
> clearer they're used for setting Breakpad's internal parameters?
Done.
http://breakpad.appspot.com/8002/diff/5033/5040#newcode275
Line 275: NSString *key);
On 2009/06/03 17:24:03, jeremy wrote:
> Can this function definition live on one line?
Done.
http://breakpad.appspot.com/8002/diff/5033/5041
File client/mac/Framework/Breakpad.mm (right):
http://breakpad.appspot.com/8002/diff/5033/5041#newcode168
Line 168: filter_callback_context_(NULL) {
On 2009/06/03 17:24:03, jeremy wrote:
> Should logFileCounter be initialized here too?
REmoved this unused instance variable.
http://breakpad.appspot.com/8002/diff/5033/5041#newcode657
Line 657: NSLog(@"Handling!");
On 2009/06/03 17:24:03, jeremy wrote:
> Debug code?, also another one bellow.
Done.
http://breakpad.appspot.com/8002/diff/5033/5038
File client/mac/tests/BreakpadFramework_Test.mm (right):
http://breakpad.appspot.com/8002/diff/5033/5038#newcode88
Line 88: [[NSMutableDictionary alloc] init];
On 2009/06/03 17:24:03, jeremy wrote:
> autorelease?
Done.
http://breakpad.appspot.com/8002/diff/5033/5038#newcode101
Line 101: andThread:(mach_port_t)thread {
On 2009/06/03 17:24:03, jeremy wrote:
> should andCode: be on it's own line?
Done.
http://breakpad.appspot.com/8002/diff/5033/5038#newcode107
Line 107: - (void)testBreakpadInstantiationWithRequiredParameters {
On 2009/06/03 17:24:03, jeremy wrote:
> Could you add some comments about what each test is testing?
Done.
http://breakpad.appspot.com/8002/diff/5033/5038#newcode117
Line 117: // Skip setting version, so that BreakpadCreate should fail
On 2009/06/03 17:24:03, jeremy wrote:
> "should fail" -> "fails."
Done.
http://breakpad.appspot.com/8002/diff/5033/5038#newcode187
Line 187: BreakpadGenerateAndSendReport(b);
On 2009/06/03 17:24:03, jeremy wrote:
> Could you separate this with spaces and add a comment such as:
> // Invoke Breakpad's exception handler.
Done.
LGTM with minor nits. http://breakpad.appspot.com/8002/diff/5045/5052 File client/mac/Framework/Breakpad.h (right): http://breakpad.appspot.com/8002/diff/5045/5052#newcode230 Line 230: // track both it's ...
Just responding to all comments, no need for furhter review http://breakpad.appspot.com/8002/diff/5045/5052 File client/mac/Framework/Breakpad.h (right): http://breakpad.appspot.com/8002/diff/5045/5052#newcode184 ...
Issue 8002: Support custom URL parameters
(Closed)
Created 17 years ago by mochalatte
Modified 16 years, 9 months ago
Reviewers: stuart.morgan, jeremy
Base URL: http://google-breakpad.googlecode.com/svn/trunk/src/
Comments: 87