Commit Graph

27 Commits

Author SHA1 Message Date
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
John Watson f1f5975d5c
Introduce an ReadableAttributes interface, with 2 implementations (#1336)
* Introduce an Attributes interface and have ImmutableAttributes and the AttributesMap implement it.

* make the attribute limiting a little clearer.

* tiny javadoc fix

* Rework to restore the Attributes class, and introduce a ReadableAttributes interface

* polish the javadoc a bit

* fix some broken javadoc

* revert example change; revert test name change

* javadoc de-escalation

* fix bad merge
2020-06-17 09:29:52 -07:00
John Watson 194f6296a9
Example cleanup/update for latest APIs (#1337) 2020-06-17 16:49:05 +02:00
Uladzislau Kiva 9191175f32
feat: examples for metrics (#1284)
* feat: examples for metrics

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/ObserverMeterExample.java

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

* feat: metrics examples adding bound() and applying review comments

* feat: example for directory search

* feat: apply review suggestions

* feat: apply review suggestions

* feat: move creation of counter out of try block

* feat: use double counter to count MB

* fix: javadoc

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* feat: apply review suggestions

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/LongCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/LongCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/LongCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/LongValueObserverExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/LongCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* feat: apply review suggestions

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/LongCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* Update examples/metrics/src/main/java/io/opentelemetry/example/metrics/LongCounterExample.java

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
2020-06-11 08:17:49 -07:00
Bogdan Drutu 25c9c2d4ac
Start 0.6.0 development cycle (#1306)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-04 08:31:53 -07:00
Paulo Janotti 7fb0d4da98
Remove SpanID from sampling parameters (#1286)
* Remove SpanID from sampling parameters

* Generate SpanId only for sampled spans

* Revert "Generate SpanId only for sampled spans"

This reverts commit 5b51eaed88.
2020-05-29 08:52:46 -07: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
John Watson 85afba6e63
Update the example code for the latest changes. (#1158) 2020-04-30 15:12:01 +02:00
Trask Stalnaker 489ef7038d
Make TracerSdk non-public (#1153) 2020-04-28 07:33:29 -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
Giovanni Liva 498e101bdf
Add grpc example (#696)
* Add build files for gRPC example
2020-04-01 17:14:46 +02: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 03b1751a2e
Sdk usage (#1003)
* Add SDK examples

* README

* Format and Copyright

* Address PR feedback

* Update build to depend on snapshots and apply gjf

* Update examples

* Switch to Logging exporter

* Address feedback

* Remove custom SpanProcessor

* Address feedback on examples

* Delete DemoUtil

* EmptyMap only
2020-03-27 10:27:43 -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
Uladzislau Kiva cefa2ab5d5
feat: update example for OT 0.2.4 (#1039) 2020-03-21 07:55:25 -07:00
Bogdan Drutu b20edbe043
Update the gradle distro for the jaeger example. (#959)
And, make sure the gradlew is executable.
2020-03-04 10:20:08 -08:00
Giovanni Liva 03f340258f Fix jaeger example (#776) 2020-01-18 18:48:47 -06:00
Giovanni Liva 8faa99ee1f Add jaeger example (#694)
* Add build scripts for Jaeger example

* Add example how to use Jaeger as exporter

* Improve naming and formatting

* Fix libraries version

* Address @arminru feedback

* Separate exporter from instrumentation

* Addressed the feedback of @bogdandrutu

* Add instruction to run Jaeger

* Addressed the feedback of @bogdandrutu
2019-12-25 07:28:19 -08:00