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

32 Коммитов

Автор SHA1 Сообщение Дата
Sugu Sougoumarane 477d8d47db
Merge pull request #5259 from systay/tiny-refactoring
Make StatementType a type alias instead of an int
2019-10-05 07:36:43 -07:00
Andres Taylor f0cfd16670 Make StatementType a type alias instead of an int
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-10-02 06:17:29 +02:00
Andres Taylor 978108243a Use standard opentracing TextMap instead of custom backend code
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-09-16 06:01:43 +02:00
Andres Taylor 9db6df7057 Use interfaces instead of functions
I believe this is more idiomatic golang, and it makes it
easier to work with the code base on modern IDEs.

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-09-10 07:41:07 +02:00
Andres Taylor fd131c8540 Made span context extraction testable and added tests
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 13:26:31 +02:00
Andres Taylor 930f6faa35 Add functionality to extract spans from strings
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 13:26:31 +02:00
Andres Taylor 8d174a8101 Minor clean ups
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 13:26:31 +02:00
Andres Taylor b845c016ee Make it possible to serialize span contexts over strings
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 13:26:31 +02:00
Andres Taylor a835bb0882 Made it clear how to remove Jaeger
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-26 08:22:50 +02:00
Andres Taylor 98d0428d51 Clean up of tracing
* Extracted the opentracing wrapper to it's own file
 * Commented all the public methods
 * gofmt/goimports
 * Made sure the two interceptor builders are similar

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-25 15:22:14 +02:00
Andres Taylor 60b4643725 Fix problems with start of tracing
Before this change, the GRPC server could get started before tracing
had been initiated, which meant that the GRPC interceptors were not
hooked up properly.

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-25 07:10:57 +02:00
Andres Taylor 2453911d69 Changing tracing configuration
* Java: tracing=[off,opentracing]
* go: tracing=[off,opentracing_jaeger]

In both environments, the default is no tracing.

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-23 16:35:57 +02:00
Andres Taylor d507fef7b9 Removing trace.NewClientSpan
Since we are not really following the OT conventions for
span annotation, I'm removing this method.

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-12 17:23:45 +02:00
Andres Taylor 459756c74d Fixups after peer review
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-12 11:04:53 +02:00
Andres Taylor 6dcdcb4607 Change how SQL queries are added to trace spans
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-02 11:58:54 +02:00
Gerald Kaszuba bba4c75a25 Jaegar command line options.
Signed-off-by: Gerald Kaszuba <gak@gak0.com>
2019-04-01 19:30:47 +11:00
Andres Taylor cdea8585f9 Move out start of tracing to plugin files
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-29 09:08:59 +01:00
Andres Taylor 96a1e3109f Hide OpenTracing better
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-28 15:20:03 +01:00
Andres Taylor ec483e45d3 Move tracing grpc code to the trace package
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:18 +01:00
Andres Taylor f0934d0e71 Remove span type since it was not being used much
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:18 +01:00
Andres Taylor 487135e5f8 Document an interface
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:18 +01:00
Andres Taylor 2b52464112 gofmt code
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:18 +01:00
Andres Taylor c9dcd5a65b Improved how to register new tracing backends
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:18 +01:00
Andres Taylor 2b4fc22d2e Mark client calls to servers as such
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:17 +01:00
Andres Taylor 4c4bf8d884 Start tracing when starting processes
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:17 +01:00
Andres Taylor 4392122102 Change the internal tracing API
The old API had an issue with contexts not being passed
around correctly. This new API should make it easier to
remember to do it correctly.

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:17 +01:00
Andres Taylor b4cd56f9f4 Adds Jaeger as a tracing implementation
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:17 +01:00
Sugu Sougoumarane 7af23e1dde license: BSD->Apache v2.0
Please refer to #2694 and #2670 for motivation and reasoning for
this change.

I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.

I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.

As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
2017-05-06 00:38:56 -07:00
Anthony Yeh b35847b8e1 Add trace.CopySpan to copy the span from one Context to another.
This can be used to maintain parent span relationships when starting
background tasks with a new context, in response to a request.
2015-01-05 23:22:08 -08:00
Anthony Yeh 001586999a Allow trace plugins to be registered from outside the package.
Fixes #248
2014-12-16 15:39:09 -08:00
Anthony Yeh 04f9e79bbc Rewrite imports for golang subrepositories.
As per this announcement:
https://groups.google.com/forum/m/#!msg/golang-announce/eD8dh3T9yyA/HDOEU_ZSmvAJ
2014-12-14 12:48:10 -08:00
Anthony Yeh e797fc38e3 Add adapter interface for tracing libraries. 2014-11-11 22:26:43 -08:00