Commit Graph

30 Commits

Author SHA1 Message Date
Mateusz Rzeszutek a9c065930d
Return interface instead of concrete implementation in instrumentatio… (#7658)
…n-api-semconv

We're already doing that for `SpanNameExtractor`, `OperationMetrics`,
`ContextCustomizer`, etc., so I figured we should do the same for
`AttributesExtractor` implementation. Also, none of the implementations
have any additional public surface - aside from the builder/factory
method users can just simply use the interface everywhere.
2023-01-31 13:21:28 +01:00
Mateusz Rzeszutek e1895e548c
Rename all methods in all Getters to use the `get*()` naming scheme (#7619)
Resolves #6562

This PR only contains renames; the actual content is in the `*Getter`
interfaces, the rest of changes is just IntelliJ doing its job.
2023-01-23 09:28:11 +00:00
Trask Stalnaker f488d94403
Capture net.host.name for netty (#6892)
This may be a regression in 1.19.0 because you can no longer reconstruct
the original url for netty server spans (previously `http.host` was
captured which could be used).
2022-10-19 09:21:50 -07:00
Mateusz Rzeszutek 0e84d10e58
Fix Restlet v2 `Message#getAttributes` calls (#6796)
Fixes #6563
2022-10-05 13:29:05 -07:00
Mateusz Rzeszutek 714ba9189e
Remove deprecated `http.host` and `http.server_name` attributes (#6709)
... and make sure the `TemporaryMetricsView` follows the current spec
2022-09-24 11:02:21 -07:00
Trask Stalnaker 429ecfc713
Update error prone (#6646)
(note that change from BDDMockito is due to
https://github.com/google/error-prone/issues/3396)
2022-09-23 11:24:40 -07:00
Mateusz Rzeszutek ba854d122a
Fix latest dep builds (#6603)
* Fix latest dep builds

* fix couchbase 3.2 too

* codenarc

* fix jedis 4.0 tests

* fix restlet 2.0 tests

* fix armeria tests

* Update instrumentation/couchbase/couchbase-3.2/javaagent/src/test/groovy/CouchbaseClient32Test.groovy

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-09-13 21:41:13 -07:00
Mateusz Rzeszutek cfdbe758f2
Net attributes getters changes (in preparation for HTTP spec impl) (#6503)
* Net attributes getters changes: instrumentation-api-semconv changes

* Net attributes getters changes: getter implementations

* Net attributes getters changes: test fixes

* Remove net.sock.host.name

* code review comments

* default getter methods & getPeerSocketAddress() method name

* set authority in grpc earlier
2022-09-12 09:20:27 -07:00
Trask Stalnaker f1774cabe2
Update net semantic convention changes (#6268)
* New net conventions: option a

* Feedback + sock.family + sock.peer.name

* peer.service + tests

* server net attributes attempt 1

* server net attributes attempt 2

* Javadoc

* Revisions

* Apply to instrumentations

* Feedback

* One more default method

* Spotless

* Fix javadoc
2022-08-18 09:02:23 -07:00
Mateusz Rzeszutek 6cd79b2a94
Deprecate the 2-arg variant of HttpCommonAttributesGeter#statusCode() (#6466)
* Deprecate the 2-arg variant of HttpCommonAttributesGeter#statusCode()

* fix liberty
2022-08-12 17:11:11 -07:00
Trask Stalnaker 68a9f20eb3
Enable PrivateConstructorForUtilityClass errorprone check (#6427)
* PrivateConstructorForUtilityClass

* Advice

* More advice

* More

* More advice

* More

* Spotless

* Fix

* Fix

* Fix

* A better solution

* Revert

* More

* Fix

* Spotless

* Fix
2022-08-10 11:30:22 +03:00
Mateusz Rzeszutek b2c90c79b5
Extract HTTP request & response content length from headers (#6415)
* Extract HTTP request & response content length from headers

* remove unused method

* fix camel tests

* fix google http client tests

* fix HttpUrlConnection tests

* fix k8s and jaxrs tests

* fix aws tests

* actually fix aws tests 🤞

* fix elasticsearch tests

* fix ratpack tests

* fix spring webflux tests

* fix vertx tests

* fix reactor netty tests
2022-08-05 10:55:47 -07:00
Mateusz Rzeszutek 5a152cd289
Deprecate uncompressed content length HTTP attributes (#6383) 2022-07-29 06:17:38 +02:00
Mateusz Rzeszutek 82b39b1012
Rename `newInstrumenter()` into `buildInstrumenter()` (#6363)
* Rename newInstrumenter() into buildInstrumenter()

* spotless
2022-07-25 12:02:46 -07:00
Mateusz Rzeszutek 3af56e7d22
InstrumentationConfig part 3: HTTP headers and peer service mappings (#6302) 2022-07-15 14:52:52 -07:00
Mateusz Rzeszutek 87b412fb40
Instrumentation API changes: OperationMetrics, OperationListener (#6016)
* Instrumentation API changes: OperationMetrics, OperationListener

* errorprone
2022-05-12 11:16:46 -07:00
Anuraag Agrawal cd528e98fb
Rename library entrypoints to Telemetry (#5624)
* Rename library entrypoints to Telemetry

* Renames
2022-03-22 14:39:23 +09:00
Mateusz Rzeszutek b0d5fc6b99
Remove deprecated methods from instrumentation-api and library instrumentations (#5575) 2022-03-15 09:33:48 +09:00
Mateusz Rzeszutek f6cca58f1f
Deprecate CapturedHttpHeaders and replace it with builder methods (#5533) 2022-03-09 12:21:32 -08:00
Mateusz Rzeszutek 4a98dae431
Add builders for setting optional attributes on HTTP extractors (#5347)
* Add builders for setting optional attributes on HTTP extractors

* errorprone

* fix compilation failure
2022-03-08 17:21:14 +01:00
Trask Stalnaker 0a6b87eb69
Remove server span peer name (#5404)
* Fix server -> client reference

* Remove server span peer name
2022-02-27 11:06:20 -08:00
Trask Stalnaker 53a8b85f4c
Updates to http.server_name (#5369)
* Updates to http.server_name

* Tests

* fix

* armeria

* fix

* fix

* codenarc
2022-02-18 09:38:21 -08:00
Trask Stalnaker 1077258263
Add InternalJavadoc custom error prone check (#5277)
* Add InternalJavadoc custom error prone check

* Add example usage

* Move to conventions

* Revert "Move to conventions"

This reverts commit d8a8209b59.

* Just get it working

* Clearer error message

* versions

* Apply almost everywhere

* feedback

* Always at the end of javadoc

* Fix test

* Missed (at least) one

* No longer internal

* Fix NPE

* Spotless

* Convert awslambda Java test to JUnit 5 so can reduce visibility

* Reduce visibility

* Rename the check

* More

* Move into errorprone-convention

* Fix UserExcludedClassesConfigurerTest
2022-02-01 17:54:57 -08:00
Mateusz Rzeszutek 8b767ac435
Refactor HTTP attributes extractors to use composition over inheritance (#5267)
* Refactor HTTP attributes extractors to use composition over inheritance

* Rename remaining variables: *Extractor to *Getter
2022-01-31 09:25:27 -08:00
Mateusz Rzeszutek edc185b133
Rename ServerSpanNaming to HttpRouteHolder (#5211)
* Rename ServerSpanNaming to HttpRouteHolder

* HttpRouteBiGetter
2022-01-25 09:44:15 -08:00
jason plumb fe8a132ee9
Factor out NetServerAttributesGetter (#5194)
* factor out NetServerAttributesGetter and favor composition over inheritance.

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetServerAttributesGetter.java

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

* errorprone and spotless

* spotless

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2022-01-21 17:01:30 -08:00
Nikita Salnikov-Tarnovski 1a9c633b4b
Rename some packages, move some classes (#5043)
* Rename some packages, move some classes
2022-01-09 13:26:51 +02:00
Mateusz Rzeszutek 0bab0c2aa3
Move `ServletContextPath` to `servlet-common:bootstrap` (#4824)
* Move ServletContextPath to servlet-common:bootstrap

* fix tests

* Simplify ServletContextPath calls in restlet instrumentation
2021-12-08 15:59:31 +01:00
Anna Nosek 16975acc67
add spring tests (#4670) 2021-11-18 11:11:22 -08:00
Anna Nosek 8b7c097912
Restlet 2.0 instrumentation (#4535)
* add restlet 2.0 instrumentation

* add restlet 2.0 instrumentation

* revies: testLibrary, create RestletInstrumenterFactory
2021-11-09 11:52:04 -08:00