Commit Graph

16 Commits

Author SHA1 Message Date
Tyler Helmuth f237238d26
[client] Remove experimental comment from `Metadata` (#9796)
**Description:** 
Removes the `experimental` tag from `Metadata`. This feature has been
used in the headerssetter extension since Aug 2022.

**Link to tracking Issue:** 
Relates to
https://github.com/open-telemetry/opentelemetry-collector/issues/9381
Related to
https://github.com/open-telemetry/opentelemetry-collector/issues/9795
2024-03-27 12:41:57 +01:00
Tyler Helmuth ae90430559
[client] Fix race condition in `Metadata.Get` (#9595)
**Description:** 
Fixes a bug where `Get` was not thread safe.

**Link to tracking Issue:** <Issue number if applicable>
Closes
https://github.com/open-telemetry/opentelemetry-collector/issues/9594

**Testing:** <Describe what testing was performed and which tests were
added.>
Tested locally
2024-02-21 13:58:43 -08:00
Alex Boten 456e75c6d4
add debug exporter, move code from logging exporter into internal (#8378)
Alternative to
https://github.com/open-telemetry/opentelemetry-collector/pull/8375

This moves most of the code from the logging exporter into two internal
packages that will eventually end up in the `debugexporter` once the
`loggingexporter` has been removed.

Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/7769

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-09-15 13:49:24 -07:00
Alex Boten 80d704deb4
[chore] use license shortform (#7694)
* [chore] use license shortform

To remain consistent w/ contrib repo, see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22052

Signed-off-by: Alex Boten <aboten@lightstep.com>

* make goporto

Signed-off-by: Alex Boten <aboten@lightstep.com>

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-05-18 13:11:17 -07:00
Bogdan Drutu a2f0153679
[chore] replace the usage of interface{} with any (#7053)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-30 15:01:25 -08:00
Alex Boten f513448463
add go 1.19 to tests (#5791)
Adding the latest version of go to the tests run by CI. To pass the tests, the following changes were required:
- run make genpdata
- fix test certificates to address errors caused by the rejection of duplicate extensions in TLS handshakes
2022-08-03 09:55:10 -07:00
Juraci Paixão Kröhling 6417a3aa16
Change metadata lookup to be case insensitive (#5646)
* Change metadata lookup to be case insensitive

Before this change, users would make references to headers such as "authorization" and "X-CloudFront-Viewer-Latitude", which would potentially fail, as they would be stored in the context as "X-Cloudfront-Viewer-Latitude" or "Authorization".

This PR changes this behavior, to attempt a case insensitive lookup to the backing map in case the key wasn't found under the requested casing. Under the assumption that the lookup key specified by users won't change, on a subsequent lookup, we proactively copy the value to the looked up key, to make the next lookup faster.

Fixes #5610
Fixes open-telemetry/opentelemetry-collector-contrib#8994

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Add changelog entry

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
2022-07-13 05:39:05 -07:00
Vitaly Orlov da91c56fe9
Add Host property for Metadata (#4736)
* Add Host to contextWithClient

* Typo fix

* Add Host to metadata

* Add changelog

* Fix changelog

* Update CHANGELOG.md

Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>

* Add MetadataHostName const

Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>
2022-01-26 11:20:27 -08:00
Kemal 87365b7fde
Include request headers in client.Info (#4547)
* Include request headers in client.Info

* Add GRPC metadata

* Add tests

* Add changelog

* Clone headers

* Add config option

* Update config/confighttp/clientinfohandler.go

Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>

* Update config/confighttp/confighttp.go

Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>

* Update config/configgrpc/configgrpc.go

Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>

* oops

* Fix the test

* Immutable metadata

* Really immutable metadata

* Really return copy, add test

* Optimize metadata getter

* Move changelog entry to unreleased

* Add experimental remarks per CR

Co-authored-by: Kemal Hadimli <disq@users.noreply.github.com>
Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>
2022-01-13 09:21:46 -08:00
Juraci Paixão Kröhling d50562948a
Populate client.Info from config helpers (#4423)
* Populate client.Info from config helpers

Fixes #4419

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Add changelog entries

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Wrap stream to override context

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Use latest go-grpc-middleware

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Remove opentracing-go from go.sum

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Remove dependency on go-grpc-middleware

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* nolint context keys in tests

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
2021-12-08 10:00:57 -08:00
Juraci Paixão Kröhling ac9619e17e
Add AuthData to client.Info (#4422)
* Add AuthData to client.Info

Fixes #4418

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

* Handle attribute in doc example

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
2021-11-22 08:14:00 -08:00
Juraci Paixão Kröhling 7dbf1b857c
Rename client.Client to client.Info (#4416)
Includes documentation and how it's expected to be used by
both providers and consumers.

Fixes #4058

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
2021-11-17 08:49:27 -08:00
José Carlos Chávez 9d3a8a4608
Adds vanity import check (#4180)
* chore: adds porto and fixes vanity imports.

* chore: fixes target overriding.

* chore: fixes install of porto.

* chore: includes porto as a tool.

* chore: upgrades porto to check internals.

* chore: rebase and update vanity import.

* chore: removes unnecessary space.

* chore: rollsback vanity import in generated files.
2021-10-12 13:47:36 -07:00
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
Bruno Garcia 8aa2731844
Remove year from copyright (#964) 2020-05-26 12:44:22 -04:00
Owais Lone 264426a9ca Added client package to help identify RPC/HTTP clients (#326)
Client package will help identify clients connecting to different
receivers and enable usecases where processors might depend on some
information about the client. For example, a rate-limiting processor
might need some information about clients to figure out when and how to
rate-limit. Also, the upcoming kubernetes processor depends on this as
it needs the IP address of the clients to properly identify resources.

Submitting this as an independent PR as it is generic enough and not
tied to any single processor or usecase.

This PR adds support to the OC, Zipkin and Jaeger GRPC receivers. I'll implement the
same feature for older jaeger receivers in a follow up PR.
2020-01-15 17:51:40 -05:00