Lightstep-Access-Token Header Addition - #64
Conversation
| @@ -1 +1 @@ | |||
| 4.0.3 No newline at end of file | |||
| 4.0.4 | |||
There was a problem hiding this comment.
Not certain if this version is updated manually or done automatically during deploy
|
|
@JulianGriggs I've tested with both use_http=True and use_thrift=True. I looked through the ThriftConnection and didn't see headers to add so it must be through the HTTP one somehowe. |
|
I'll split it up |
| @@ -1,3 +1,7 @@ | |||
| <a name="4.0.4"></a> | |||
| ## [4.0.2](https://github.com/lightstep/lightstep-tracer-python/compare/4.0.2...4.0.3) | |||
| * Add LightStep-Access-Token headers to outgoing requests. | |||
| ```python | ||
| return lightstep.Tracer( | ||
| component_name='WhatIDoWhatIDidnt', | ||
| access_token='587145376229b4e8cc4d99d948bb967b', |
There was a problem hiding this comment.
Delete this access token and the collector host. This shouldn't be committed. In fact, I think to demonstrate this point you should do
return lightstep.Tracer(
....,
use_http=False,
use_thrift=True,
....,
)There was a problem hiding this comment.
Woops, sorry about that
|
Alright |
| @@ -1 +1 @@ | |||
| 4.0.3 No newline at end of file | |||
| 4.0.3 | |||
There was a problem hiding this comment.
nit: can you add back the newline so that there is no diff here
| as enabling use_thrift. | ||
|
|
||
| ```python | ||
| return lightstep.Tracer( |
There was a problem hiding this comment.
I still think that detailing the other options to this call makes it more difficult to consume the textual information. As a reader, I start wondering if the other parameters are relevant.
| ``` | ||
|
|
||
| ### Thrift | ||
| When using apache thrift rpc, make sure to both disable use_http by setting it to False as well |
There was a problem hiding this comment.
Can we wrap use_http, use_thrift, False, and True with ticks (`) so that they are more obviously read as code parameters
|
@cboppert One last comment, if you could squash these commits together that would be great -- to clean it up a little bit. |
|
@JulianGriggs Wouldn't we just squash on merge? |
austinlparker
left a comment
There was a problem hiding this comment.
Overall it's fine other than the readme.
| ``` | ||
|
|
||
| ### Thrift | ||
| When using apache thrift rpc, make sure to both disable use_http by setting it to False as well |
There was a problem hiding this comment.
You don't need to explicitly disable the transport you don't want (see
)There was a problem hiding this comment.
Hey @austinlparker use_http is set to True by default as you can see in
So if you don't set use_http to False and only set use_thrift to True, then it always runs the first if block and never hits the second.
There was a problem hiding this comment.
That strikes me as a bug then, we should fix that.
There was a problem hiding this comment.
I agree, but it's out of scope for this
There was a problem hiding this comment.
I'll just fix this in a separate PR.
There was a problem hiding this comment.
I'll just fix this in a separate PR.
| When using apache thrift rpc, make sure to both disable use_http by setting it to False as well | ||
| as enabling use_thrift. | ||
|
|
||
| ```python |
There was a problem hiding this comment.
For consistency, we generally prefer the options block in README code samples to be minimal. If you want to improve the README by adding a table that explains the options, that would be good. See https://github.com/lightstep/lightstep-tracer-csharp/blob/master/README.md#advanced-usage for an example.
There was a problem hiding this comment.
I'll address this in a separate PR
This PR adds the Lightstep-Access-Token header to the lightstep tracer python.
It also includes some readme updates I discovered while setting up the local python tracer example.