Commit Graph

797 Commits

Author SHA1 Message Date
jack-berg 06158ffc2d
Cleanup readmes (#5263) 2023-03-06 09:39:34 -06:00
jack-berg 0ac01c6cec
Event emitter provider (#5049)
* Split out :api:events

* Remove events from :api:logs

* Log SDK also implements Events API

* Fix example

* Add SdkEventEmitterProvider which delegates to LoggerProvider

* Make eventDomain argument optional
2023-02-03 15:45:40 -06:00
jack-berg 8897dd4d5c
Revert removal final newline (#5133)
* Revert removal final newline

* Add to final newlin editorconfigoverride
2023-01-18 08:51:41 -06:00
dependabot[bot] 1e4a7be6be
Bump spotless-plugin-gradle from 6.12.1 to 6.13.0 (#5126)
* Bump spotless-plugin-gradle from 6.12.1 to 6.13.0

Bumps [spotless-plugin-gradle](https://github.com/diffplug/spotless) from 6.12.1 to 6.13.0.
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/gradle/6.12.1...plugin-gradle/6.13.0)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-plugin-gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2023-01-17 16:47:56 -06:00
jack-berg ece93b77a1
Use ConfigUtil internally (#5048) 2022-12-17 16:10:46 -06:00
jack-berg 34f2601347
Update LoggerBuilder, MeterBuilder, TracerBuilder javadoc (#5050) 2022-12-17 13:16:02 -08:00
jack-berg 7c6f1bd73e
GlobalOpenTelemetry trigger of autoconfiguration is opt-in (#5010)
* Do not initialize AutoConfiguredOpenTelemetrySdk in OpenTelemetry.get

* GlobalOpenTelemetry triggers autoconfigure based on env var / system property
2022-12-14 15:10:55 -06:00
jack-berg 5fb50c1d5e
Add toString implementation to various propagator components (#4996) 2022-11-29 10:37:31 -06:00
Łukasz Monkiewicz e8146020cc
Adds '+' character to allowed characters in baggage value (#4898)
* Adds '+' character to allowed characters in baggade value

* Formatting fix

* Adda BaggageCodec implementation

* Additional cleanup

* Removal of Nullable method parameters.

* Additional tests for baggage decoding
2022-11-10 12:13:31 -06:00
jason plumb fedcbbe889
Add missing javadoc param to ImmutableSpanContext.create() (#4903)
* add missing param

* change wording to indicate optimization

* Update api/all/src/main/java/io/opentelemetry/api/internal/ImmutableSpanContext.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2022-11-02 18:13:28 -07:00
jack-berg db1d0652b2
Decode resource attributes specified via otel.resource.attributes (#4756) 2022-10-18 11:45:34 -05:00
jack-berg bd0cf78c39
Ensure GlobalLoggerProvider is set once (#4804)
* Ensure GlobalLoggerProvider is set once

* Add GlobalLoggerProviderTest

* PR feedback
2022-10-03 13:47:36 -05:00
jack-berg 5fee9b7e95
Suppress logs in logger tests (#4806) 2022-10-03 11:13:01 -05:00
jack-berg 01a07b51a1
Add event API (#4781)
* Add event API

* Log when emitting event without domain, add javadoc example to Logger
2022-09-27 17:39:33 -05:00
jack-berg f7317c6e8d
Split out logs API (#4764) 2022-09-22 13:23:52 -05:00
Sampath 45a1593575
Simplified the assertions (#4726) 2022-08-29 12:06:59 -07:00
David Turner cfbe5f9d20
Avoid unnecessary stack trace capture (#4663)
Constructing an `AssertionError` is rather expensive, and pointless in
cases that we're not even going to log it. With this commit we skip all
this unnecessary work.

Relates https://github.com/elastic/elasticsearch/issues/89107
2022-08-05 13:04:23 -05:00
xiangtianyu 51fb582a36
bugfix: fix ImmutableKeyValuePairs bugs (#4573)
* fix bug

* change the fix

* add new cases and changed the way to fix the bug

* fix some describe words

Co-authored-by: John Watson <jkwatson@gmail.com>

* modify some describe mistake

Co-authored-by: John Watson <jkwatson@gmail.com>

* run spotlessApply

Co-authored-by: John Watson <jkwatson@gmail.com>
2022-07-06 12:07:57 +09:00
jack-berg 86cc4bc27d
Add some missing since annotations (#4520) 2022-06-09 20:41:52 -05:00
jack-berg 4a8850cc64
Improve metrics API javadoc (#4493)
* Improve metrics API javadoc

* Fix typo

* Switch to Title Case for instrument names

* Add @since annotations
2022-05-27 10:02:02 -05:00
jack-berg de824dc93a
Add batch callback API (#4376)
* Add batch callback API

* Update API to accept varargs of instruments

* Add more tests

* Add default API implementations, more test coverage

* PR feedback
2022-05-25 12:50:09 -05:00
jack-berg 98369a5aad
Return noop instrument if name is invalid (#4383)
* Return noop instrument if name is invalid

* Validate instrument name in default meter

* Use API Usage logger and include stack trace

* Rename methods to check* instead of is*
2022-04-20 13:25:00 -05:00
jack-berg c2d8f6abd9
Set unit to 1 if invalid (#4384)
* Set unit to 1 if invalid

* Improve error message, validate unit in DefaultMeter calls

* Fix typos

* Include stack trace
2022-04-19 10:45:55 -05:00
Anuraag Agrawal d78cadabaa
Update errorprone (#4346) 2022-04-08 08:12:57 +09:00
Anuraag Agrawal bc9dafca03
Fix tracestate builder reuse and Optimize. (#4325) 2022-04-01 11:47:35 +09:00
Trask Stalnaker cd2583df6a
Add misspell check (and fix misspellings) (#4290)
* Add misspell check

* Fix misspellings

* Spotless
2022-03-22 15:12:40 +09:00
John Watson dc8086dfca
Add scare text to the javadoc for GlobalOpenTelemetry (#4223)
* Add scare text to the javadoc for GlobalOpenTelemetry

* add another javadoc blurb
2022-03-03 17:48:07 -08:00
jack-berg 963bc384c8
Instrumentation scope (#4215)
* Add InstrumentationScopeInfo class

* Rewrite tracer provider documentation

* Refactor ComponentRegistry to use InstrumentationScopeInfo

* Finish updating documentation to reference scope instead of library

* PR feedback
2022-02-26 10:43:55 -08:00
jack-berg 9f10e0048e
Allow multiple async callbacks, allow callbacks to be removed (#4143)
* Allow multiple async callbacks, allow callbacks to be removed

* Use AutoCloseable to remove callbacks, don't unregister from MetricStorageRegistry

* Use CopyOnWriteArrayList

* PR feedback

* PR feedback
2022-02-25 11:51:51 -06:00
Beppe Catanese 13fb460a54
(4172) Vararg versions of AttributeBuilder.put (#4188)
* Overload put with AttributeKey with String array

* Use generic instead of String

* Format and javadoc

* Cast to type

* New public method

* File based view configuration (#4163)

* Add experimental view config module

* Rename view-config to metric-incubator

* Switch naming from camelCase to snake_case

* Extend with attribute key filter

* Wire up to autoconfiguration

* Use snakeyaml instead of jackson

* PR feedback

* PR feedback

* Remove explicit okio dependency (#4187)

* Deprecate PrometheusCollector (#4185)

* Correct javadoc

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

* Cast to type

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-02-24 14:04:57 -08:00
Knut Wannheden 083dca1b94
Marshal trace state in OTLP exporter (#4191)
Includes the trace state in the marshaled spans and span links, resolving the corresponding TODOs in the code.

The `tracestate` header encoding and decoding logic has been moved to a new internal class `W3CTraceContextEncoding`.

Fixes: #4189
2022-02-24 09:18:38 +09:00
Lauri Tulmin 9c6cc22fb6
Javadoc code snippets use methods that don't exist (#4140)
* Replace OpenTelemetry with GlobalOpenTelemetry in javadoc code snippets

* use openTelemetry instread of GlobalOpenTelemetry

* replace one ome usage of GlobalOpenTelemetry
2022-02-02 12:20:36 -08:00
Anuraag Agrawal 3773d0b18a
Update errorprone (#4134) 2022-01-31 08:00:17 -08:00
jack-berg 7c9234e1ae
Add missing internal disclaimers (#4086) 2022-01-13 14:00:12 -08:00
Beppe Catanese 286383b218
Single logger instance for invalid API call (#4073)
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
2022-01-12 13:16:09 +09:00
Anuraag Agrawal dfb4a74ac5
Update errorprone (#4048) 2022-01-06 11:33:00 +09:00
jack-berg 318091a170
Expand GlobaOpenTelemetry and OpenTelemetry to include metric accessors (#4035) 2022-01-04 11:27:37 +09:00
jack-berg b88107a1e4
Use singletons in noop implementation, reduce visibility of internal classes (#4030) 2021-12-28 10:19:50 +09:00
Anuraag Agrawal 538af68ee6
Return an interface when registering metric callbacks. (#4022)
* Return an interface when registring metrics.

* Return type-specific

* untypo
2021-12-23 13:13:13 +09:00
Anuraag Agrawal 6e28c10c72
Remove ObservableMeasurement superinterface (#4023) 2021-12-22 13:47:47 +09:00
Anuraag Agrawal 8d6e5b87f1
Make behavior of private method more explicit. (#4017) 2021-12-22 10:01:09 +09:00
Anuraag Agrawal 10ed89ea4c
Remove deprecated methods from ObservableMeasurement (#4018)
* Remove deprecated methods from ObservableMeasurement

* Hack japi
2021-12-22 10:00:57 +09:00
Anuraag Agrawal d88b09cc0b
Reduce volatile reads in GlobalOpenTelemetry.get (#4009) 2021-12-21 11:49:15 +09:00
Anuraag Agrawal 1e9fb21c64
Remove deprecated metrics APIs (#3990) 2021-12-15 11:51:32 +09:00
Anuraag Agrawal 737a5e2b26
Deprecate GlobalMeterProvider (#3948) 2021-12-03 08:43:49 +09:00
Anuraag Agrawal b1651a18cf
Rename .observe to .record (#3949)
* Rename .observe to .record

* Apply deprecation
2021-12-03 08:37:22 +09:00
jason plumb 51556cd67a
Move key/value validation from ImmutableBaggage to the W3CBaggagePropagator (#3871)
* move key/value validation from ImmutableBaggage to the W3CBaggagePropagator

* remove import

* enforcement parade

* let baggageToString() return String

* Nits

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-12-02 09:47:31 +09:00
jack-berg 12a54710b7
Remove bound instrument from metric API, move to internal package of metric SDK (#3928) 2021-11-24 13:23:31 +09:00
Anuraag Agrawal 55ff1dc533
Promote metrics API to stable (#3919)
* Add MeterProvider to OpenTelemetry API

* Spot

* Set

* Move NoopMeter to package private

* Merge metrics API code into API package

* Finish

* Fix / clean

* Drift

* Update extensions/noop-api/src/main/java/io/opentelemetry/extension/noopapi/NoopOpenTelemetry.java

Co-authored-by: John Watson <jkwatson@gmail.com>

* Spot

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-11-24 08:39:55 +09:00
Josh Suereth 19f6fa79f0
Take a pass at fixing metrics API javadoc issues/missing information. (#3874)
* Take a pass at fixing metrics API javadoc issues/missing information.

* Spotless fix.
2021-11-17 12:53:46 -08:00