Граф коммитов

78 Коммитов

Автор SHA1 Сообщение Дата
Matthew Wear 800e3b041c
Updated B3 trace id handling (#91)
* Restore configurable propagator option

* Propagate B3 id in the same format received

* Relax interpretation of sampled flag

The B3 spec says a forgiving implementation will accept 1 or true and 0
or false as sampling values, even though only 1 or 0 should be used.

* Fix typos

* Correct changelog for B3
2019-11-12 18:36:24 -08:00
Ben Fischer 88b4facd20 ensure scope and span are properly cleaned up in the event of an error (#89)
* ensure scope and span are properly cleaned up in the event of an error
2019-11-06 14:30:20 -08:00
Matthew Wear b3700d7f44
Propagate sampled flag in-process and improve docs (#88)
* Propagate sampled flag in process

* Improve docs

* Use most significant bits for trace id; pad least significant bits
2019-10-28 17:00:22 -07:00
Matthew Wear 38b6701e7a
B3 context propagation (#86)
* Extract LS context propagation into configurable propagator class

* Extract context prop test cases to LightStepPropagator spec

* Make LightStepPropagator easier to subclass

Constant lookup will search in Module.nesting before looking up
the inheritance chain, which makes constants hard to override
when subclassing. This commit prefixes constants in the
LightStep propagator with self.class in order to steer lookup
to the inheritance chain.

* Introduce B3 Propagator

This commit introduces a B3 Propagator where keys are properly
injected and extracted under the proper names. Special handling
of the trace id and sampled flag will come in subsequent commits.

* Propagate 16 byte trace ids for B3; use 16 byte ids internally

* Honor and propagate sampled flag for B3

* Clean up tests

* Specify default propagator for Tracer#configure

* Test against currently maintained Rubies

This updates our build matrix to test against Ruby versions that are
still under maintenance by the Ruby core team.

* The mutating tr! and downcase! methods are not chainable; don't chain them

* Make it easier to specify a propgator

* Update changelog for B3
2019-10-24 14:27:25 -07:00
Josh Lauer 4f28619649 Update to the latest version of OpenTracing gem and update dependencies. (#82)
* bump opentracing and other gems

* Add support for opentracing-ruby 0.5.0
2019-08-27 14:18:43 -04:00
Isobel Redelmeier a7bc8921a0 Handle #extract when carrier has symbolized keys
(Fixes #75)
2018-11-29 14:52:15 -08:00
Isobel Redelmeier 94d8265c73 Add Span#log_kv and deprecate Span#log
In 0.4.0, opentracing-ruby deprecated Span#log in favour if Span#log_kv
(https://github.com/opentracing/opentracing-ruby/pull/23).

(Closes #72)
2018-11-06 10:20:37 -08:00
Austin Parker 0bbc29a1d1 address review comments 2018-10-25 11:02:17 -04:00
Austin Parker 6347bac301 address review comments 2018-10-24 17:25:54 -04:00
Austin Parker a8d08b3b98
Merge branch 'master' into fix/spanTagToStringOnBuild 2018-10-24 15:03:58 -04:00
Austin Parker 7fadd2946e fix tests 2018-10-24 14:53:05 -04:00
Austin Parker 6776b10cfb set span tags to string on build 2018-10-24 14:51:32 -04:00
Kris Hicks 3a7736eb8e
Add support for opentracing-ruby 0.4.0 (#68)
This is to bring lightstep-tracer-ruby in line with opentracing-ruby 0.4.0: 4114b64f84

The specification for that changeset in opentracing is here: https://github.com/opentracing/specification/blob/master/rfc/scope_manager.md#scopemanager

LS-5707
2018-10-18 08:07:24 -07:00
Alice 275cd56d2b
Merge branch 'master' into rename-span-context-to-context 2018-10-11 11:40:21 -07:00
Shaun 8e3b701d42 Various cleanups, add SSL/timeout configuration to HTTPJSON, properly log collector errors 2018-09-18 09:11:05 -05:00
Kris Hicks 1e3e7d8047 Add support for references to start_span
LS-1368
2018-04-19 16:18:56 -07:00
Ben Sigelman 9de6885902 Reference the OT versions of formats 2017-02-15 22:05:28 -08:00
rlhh 432b08ed1d Rename span.span_context to span.context 2017-02-08 12:03:27 -08:00
Ben Sigelman 2b875d2a71 Modernize per the main OpenTracing spec
Note that the "OpenTracing spec" here is
https://github.com/opentracing/specification/blob/master/specification.md
rather than github.com/opentracing/opentracing-ruby (which does not
reflect Summer 2016 changes to Inject/Extract).

The idea here is to have the small number of LightStep API users vet
these changes before they're proposed in opentracing-ruby.

Given the dynamic nature of Ruby's type system, the ordering of
LightStep and OpenTracing API changes is formally unimportant.
2017-02-05 15:16:37 -08:00
Ben Sigelman 29e69c585d Fix tests 2017-02-02 20:28:45 -08:00
Ben Sigelman f547330516 Remove print statement 2017-01-31 17:14:27 -08:00
Ben Sigelman a64f08cf19 Support for modernized KV logging 2017-01-31 16:47:58 -08:00
Nan Zhong f932dd14f6 add spec for inheriting baggage using #start_span 2017-01-23 08:55:27 -05:00
Ben Sigelman 439c9ef19c Fix the dropped spans test, too 2017-01-10 21:49:51 -08:00
Adam Roben 75a6d2c516 Ensure span names are always strings
The collector will reject any report that contains a non-string span
name, so now we convert span names to strings via #to_s. This matches
what we do with tag values.
2016-12-22 10:12:56 -05:00
Nick Gauthier 6c880e87e6 allow user to provide tracer-level tags 2016-11-22 12:32:11 -05:00
Nick Gauthier d1f99c7f7f allowe mixed case and underscores in rack inject 2016-11-14 13:11:47 -05:00
Nick Gauthier 430b03c333 change to rack-specific format 2016-11-14 13:09:18 -05:00
Nick Gauthier 9a443e4792 drop baggage keys that can't be used as http headers during extract
additional tests cases around case and underscores
2016-11-11 14:45:58 -05:00
Nick Gauthier 4b9169f751 use -s in http headers and ignore case 2016-11-10 14:32:23 -05:00
Nick Gauthier d98f2f5f2e Merge remote-tracking branch 'origin/master' into ngauthier/rack-http-inject-extract 2016-11-10 14:19:58 -05:00
Nick Gauthier 69e4a9dcba no spancontext delegation 2016-11-10 12:18:40 -05:00
Nick Gauthier 492c0eaa5b inject and extract for http requests and rack requests 2016-11-10 10:28:41 -05:00
Nick Gauthier e7b3e1b3a5 extract SpanContext from span
* rename Span#guid -> Span#id
* rename Span#trace_guid -> Span#trace_guid
* delegate id, trace_id, baggage to SpanContext
* Freeze SpanContext data to prevent modification
* Copy SpanContext when modifying baggage
* Provide faster Span#set_baggage to bulk set baggage on initialization
* Spans inherit SpanContext fields
2016-11-07 13:34:50 -05:00
Ben Sigelman 444e2e73cf Allow writes to the Span.operation_name attribute 2016-11-04 11:39:44 -07:00
bhs 1473599b5b Merge pull request #31 from lightstep/bhs/tags_on_start
Fix tag-setting at start_span time
2016-11-04 09:29:57 -07:00
Ben Sigelman 8eff36dabd Fix tag-setting at start_span time 2016-11-04 09:26:36 -07:00
Adam Roben c4e8dd32a5 Set a non-nil runtime guid in submitted reports
Tracer#guid was never getting set. This broke in
26ae4f094d.

In addition, Reporter's @guid ivar was unused, so I removed it.
2016-11-04 11:58:56 -04:00
Adam Roben 0efc07f96e Add failing tests for behavior while disabled 2016-11-02 11:17:09 -04:00
Nick Gauthier da22d038e6 logs on spans 2016-10-31 18:35:23 -04:00
Nick Gauthier a85bad5ef1 remover tracer stutter and fix runtime attributes 2016-10-31 15:25:54 -04:00
Nick Gauthier 16db17890c KV logging refactor (before span logging) 2016-10-31 15:10:28 -04:00
Nick Gauthier bb73bd7fd3 convert tag value to string instead of exception 2016-10-31 13:56:28 -04:00
Nick Gauthier 38fd69ba39 rename gem and bump to version 0.9.0 2016-10-31 13:38:31 -04:00
Nick Gauthier 4748d8f274 documentation 2016-10-28 17:09:47 -04:00
Nick Gauthier 5e438a1cd2 rubocop -a 2016-10-28 16:27:50 -04:00
Nick Gauthier 2ff3aaf4e4 rename join to extract 2016-10-28 14:51:14 -04:00
Nick Gauthier 1b749e0265 only set end_time on finish, not start 2016-10-28 14:31:23 -04:00
Nick Gauthier bf6324aabe span constructor and attributes according to spec 2016-10-28 14:22:43 -04:00
Nick Gauthier 61ecd37be8 Span#set_tag only supports string, bool, number 2016-10-28 12:35:20 -04:00