Commit Graph

72 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
Reginald McDonald faf99ae104
2508: Logging Exporter Example for Trace and Metrics (#2789)
* Added example for logging exporter

* Used global otel for tracing

* Revert "Used global otel for tracing"

This reverts commit 8f267731ef.

* Register the trace provider as global
2021-02-10 11:14:33 -08: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
Anuraag Agrawal 9ac3629416
Publish artifacts directly to sonatype. (#2596) 2021-01-28 08:05:54 -08:00
Anuraag Agrawal fd327e657b
Update to Gradle 6.8.1 (#2576) 2021-01-25 08:12:26 -08:00
John Watson 13f9d3169e
Update the grpc example to more carefully match our best practices (#2538) 2021-01-15 10:35:26 -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 e9c71e590a
update the Jaeger example to cleanly separate SDK and API usage (#2531)
* update the Jaeger example to cleanly separate SDK and API usage

* formatting
2021-01-14 19:42:17 -08:00
John Watson 1a149a6292
Clean up the OTLP example (#2530)
* Clean up the OTLP example

* formatting
2021-01-14 15:02:54 -08:00
John Watson f719555254
Update the PrometheusExample to use more recommended patterns (#2521) 2021-01-14 09:36:51 -08:00
John Watson 9a0ff546a5
Update the zipkin example to better match best practices, and update all to work with 0.14.1 (#2484)
* update the zipkin example to more closely match our recommended approaches.

* split out the SDK config/management into its own class

* update for 0.14.1

* formatting

* get the examples up to date for 0.14.1
2021-01-13 20:16:44 -08:00
shalk(xiao kun) de1df0a22b
fix gradle version to 6.7.1 (#2410) 2020-12-28 21:51:31 +09: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
Bogdan Drutu 57d68f228a
Fix Jaeger example to use the artifacts from the bom (#2237)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-08 17:06:20 -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 ec7884fbf0
Update the docs for the 0.11.0 release (#2097)
* update the docs for the 0.11.0 release

* also update the examples dependency, since no changes are necessary
2020-11-19 12:20:08 -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 6e05d059ba
Add github action to build examples when changes are identified in example directory (#1962)
Update grpc version to generate one change in examples.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-02 06:41:31 -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
Bogdan Drutu f975dfe616
Update to use google java format 1.9 in the examples (#1954)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-31 13:25:15 -07:00
Bogdan Drutu d00d50c906
Rename all packages to follow the module name definition (#1952)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-31 10:59:11 -07: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 f5c1971a96
Make the jaeger example send more spans to make sure that they get properly exported. (#1847) 2020-10-22 10:25:03 +09:00
Anuraag Agrawal 082791503b
Upgrade to Gradle 6.7 and use toolchains feature to build on 11 and t… (#1829)
* Upgrade to Gradle 6.7 and use toolchains feature to build on 11 and test on 11/8.

* Debug (probably first JDK download taking some time)

* Remove now unnecessary java toolchain workarounds

* Remove debug

* Remove windows build for now

* bin

* Raise no_output_timeout since this change seems to eliminate cache and build doesn't finish.
2020-10-21 15:01:50 +09:00
John Watson c01112b973
fix examples broken by an errant script (#1814) 2020-10-16 17:59:16 +02:00
Christian Neumüller 62a96ae1ed
Add .gitattributes. (#1798)
* Add .gitattributes.

This fixes spotlessCheck when checking out on windows with git core.eol=crlf and core.autocrlf=true.

Note that for git itself, the eol=lf next to the text=auto changes nothing, but spotless tries
enforce the core.eol line endings anyway.

* Adjust .gitattributes towards instrumentation's
2020-10-15 16:03:55 -07:00
hengyunabc 572d6abad3
Use the same version of gradle (#1806) 2020-10-15 11:01:52 -07: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
Anuraag Agrawal ed169645f7
Migrate to spotless (#1748)
* Use spotless for formatting / license check

* Apply formatting

* README

* Apply to example

* google-java-format 1.8 for now

* google-java-format 1.7 for now (last supporting Java 8)
2020-10-05 16:41:21 +09: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 c0969d4680
Remove an unused import from the examples. (#1708) 2020-09-26 15:04:20 +09:00
Bogdan Drutu 2d146bbbb9
Remove constant labels from instruments and MetricData (#1692)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-24 15:14:04 +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
Eunice Kim 0ec2914275
Updated sampling result name (#1661)
* Changed all sampling result names

* Changed all sampling result names - spanbuilderSdkTest

* Changed all sampling result names

* Changed all sampling result names - spanbuilderSdkTest

* fixed formatting violations

* fixed formatting violations

* Update sdk/tracing/src/main/java/io/opentelemetry/sdk/trace/Sampler.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-09-18 10:36:56 -07:00
John Watson 721a7cdf2e
Create a simple example of using the OTLP exporters (#1616)
* Create a simple otlp example, with a docker-compose collector setup.

* Add metrics into the example

* formatting

* remove the go metrics load generator

* remove unneeded pieces of the docker config; switch to using the BSP in the example code.

* Update examples/otlp/docker/otel-collector-config-demo.yaml

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-09-02 20:17:24 -07:00
John Watson ef7796a962
Clean up and update the examples for the latest API changes. (#1593) 2020-08-27 11:28:52 -07:00
jarebudev a08dd9fbe4
1503 prometheus example (#1541)
* added prometheus exporter example

* tidying up

* Update examples/prometheus/README.md

Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>

* Update examples/prometheus/README.md

Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>

* added port arg check as per code review suggestion

Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
2020-08-17 14:17:05 -07:00
Sergei Malafeev 86005245a5
Merge pull request #1545
* #1382 instead of waiting use TracerSdkProvider.shutdown() in examples
2020-08-17 09:58:01 -07:00
Carlos Alberto Cortez b002d75212
Start 0.8.0 development cycle (#1497) 2020-08-03 17:07:13 -07:00
John Watson 4680c3a327
Fix examples from the latest updates. (#1495) 2020-08-03 19:31:16 +02: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
Carlos Alberto Cortez e976bc955a
Start 0.7.0 development cycle (#1391) 2020-07-02 01:34:33 +02:00
neeraj97 3bd02e896a
Added example module for zipkin trace exporter (#1383)
* Add example module for Zipkin

* Updated to include Zipkin example module

* Changed to use shutdown() on TracerSdkProvider

* Changed zipkin example module to use shutdown() on TracerSdkProvider
2020-06-30 08:21:32 -07:00
John Watson 2074b4d3ce
Clean up examples for the latest attribute changes (#1362) 2020-06-19 21:39:31 +02:00
Bogdan Drutu 32810f04b9
Upgrade deps and fix examples (#1357)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-18 12:00:24 -07:00