Commit Graph

29 Commits

Author SHA1 Message Date
John Watson 931ad5b723
Properly shutdown tracer providers synchronously via close() (#2828)
* Properly shutdown tracer providers synchronously via close()
Resolves #2825

* formatting
2021-02-17 10:39:19 +09:00
John Watson 964996f538
update the examples for 0.16.0 (#2780) 2021-02-09 12:09:00 -08:00
Anuraag Agrawal 393420dd1c
Use shadow plugin to generate bundled jars. (#2641)
* Use shadow plugin to generate bundled jars.

* Update workflow

* Fix workflow command
2021-02-02 12:04:54 +09:00
John Watson 68ee47108a
Example updates for 0.15.0 (#2611)
* WIP on updating examples for 0.15.0

* final updates to 0.15.0

* make the getter static
2021-02-01 09:24:02 -08:00
John Watson 8e0d7fbf07
Update the http example to show better SDK/API separation. (#2532) 2021-01-15 08:44:59 -08:00
John Watson 2ac3ff6e83
Convert the examples to not use the GlobalOpenTelemetry instance. (#2364)
* update the grpc example to remove global usage

* update the http example to remove global usage

* update the jaeger example to get rid of the global usage

* update the metrics example to get rid of the global OpenTelemetry usage

* update the otlp exporter example to get rid of the global OpenTelemetry usage

* update the sdk-usage example to get rid of the global OpenTelemetry usage

* update the zipkin example to get rid of the global OpenTelemetry usage

* run the formatter

* update method names and details based on feedback
2020-12-18 16:21:51 -08:00
John Watson ba90083780
update the examples for 0.13.1 (#2360) 2020-12-18 10:03:27 -08:00
John Watson 596b4ba894
Update the examples for the 0.12.0 release. (#2198) 2020-12-04 12:28:35 -08:00
John Watson a5f7286e5c
Update the examples for v0.10.0 (#2030)
* Update the examples for v0.10.0

* make sure to install the propagator for the client/server examples

* rename method to be more consistent
2020-11-05 16:32:58 -08:00
Bogdan Drutu 698e9f4ad6
Use boms for grpc and opentelemetry in the examples (#1953)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-01 08:07:47 -08:00
Anuraag Agrawal fc14e3f0c2
Revert package rename in examples. (#1902) 2020-10-27 19:21:18 -07:00
Anuraag Agrawal 7ebbe7979d
Move API packages to .api. package (#1892)
* Move API packages to .api. package

* Cleanup
2020-10-28 08:39:41 +09:00
John Watson c01112b973
fix examples broken by an errant script (#1814) 2020-10-16 17:59:16 +02:00
Bogdan Drutu b73a063901
Remove getCurrentContext and withSpan from Tracer (#1809)
* Remove getCurrentContext and withSpan from Tracer

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Remove old java7 example

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-15 10:58:41 -07:00
John Watson 246b402769
update the examples for 0.9.1 (#1779)
* update the examples for 0.9.1

* update the examples for 0.9.1
2020-10-11 20:50:22 -07:00
dengliming 71ba8e1b87
Use the concise license header without the year (#1623)
* Use the concise license header without the year

* Use the concise license header without the year
2020-10-02 22:42:53 +09:00
John Watson 909beb0e3d
Fix example code for 0.8.0, non-snapshot dependency (#1681)
* Update the examples for the 0.9.0-SNAPSHOT changes

* revert back to 0.8.0, non-snapshot
2020-09-23 15:12:48 +09:00
John Watson ef7796a962
Clean up and update the examples for the latest API changes. (#1593) 2020-08-27 11:28:52 -07:00
ET 78ac35a740
Call initTracer just once at beginning of main in http example (#1407)
* Call initTracer just once at beginning of main.

This fixes a bug where each time a new HttpClient is instantiated, it adds a new SpanExporter to the
global OpenTelemetry SDK instance.

* s/InitTracer/InitTracerSdk/
2020-07-12 08:02:31 -07:00
John Watson 194f6296a9
Example cleanup/update for latest APIs (#1337) 2020-06-17 16:49:05 +02:00
ET f8c7e0d3c3
Fix examples to use [Batch|Simple]SpanProcessor (#1280)
https://github.com/open-telemetry/opentelemetry-java/pull/1241 changed the names of
[Batch|Simple]SpansProcessor to [Batch|Simple]SpanProcessor but did not change the examples to
match. This fixes the examples so that they now build correctly.
2020-05-27 20:35:30 +02:00
John Watson 586793f405
Update the examples for the latest changes (#1242)
* fix the examples for the latest

* pick up formatting changes
2020-05-18 15:29:28 -07:00
John Watson d3768b24be
Move the span operations inside the scope in the http server example (#1227)
* Move the span operations inside the scope, to show better idiomatic usage of the API.

* rename parameter

* update to start the span before it is added to the scope

* properly parent the newly created span.
2020-05-15 11:29:20 -07:00
John Watson 450d4a8f80
Update the examples to work with 0.5.0-SNAPSHOT (#1206) 2020-05-12 14:01:08 -07:00
Gregor Zeitlinger ebcd508a88
add shortcut methods to get tracers and meters (#1159)
* add shortcut methods to get tracers and meters

* add shortcut methods to get tracers and meters

* add shortcut methods to get tracers and meters

* add shortcut methods to get tracers and meters
2020-05-06 11:30:33 -07:00
Giovanni Liva 1396200627
Examples share a common gradle build script (#1123)
* Examples in a single separate project. Bump version to 0.4.0-SNAPSHOT

* Formatting

* Gradle 6.3. Remove local wrappers
2020-04-22 07:53:19 -07:00
Bogdan Drutu 63b9b5f505
Update to use gradle 6.3 in all projects (#1103)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-11 16:27:37 -07:00
Carlos Alberto Cortez fb59147d96
Update our examples to use 0.3.0 (#1054)
* Update our examples to use 0.3.0

* Version tuning.
2020-03-30 13:36:03 -07:00
Giovanni Liva 2d892444d1
Add http example (#695)
* Add build scripts for HTTP example

Add HTTP example

Improved naming and formatting

Add Semantic Convention to traces

Fix semantic convention

* Add Examples as OpenTelementry project

* Changed the build configuration - Examples are compiled with the main project

* Addressing comment of @carlosalberto

* Addressed the feedback of @bogdandrutu

* Removed InMemory exporter. Example as standalone project.

* Remove examples from main build

* Making the exporter private and static

Change visibility of attributes

* Update HTTP example README

* Apply java format

Co-authored-by: Inseo Kim <sano307@naver.com>
2020-03-24 09:08:52 -07:00