Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to using a skipper in the echo otel middleware #829

Merged
merged 4 commits into from
Jul 23, 2021

Conversation

pcairns
Copy link
Contributor

@pcairns pcairns commented Jun 24, 2021

Allow for a skipper (https://github.com/labstack/echo/blob/master/middleware/middleware.go#L15) to be passed into the echo middleware. The use case for this is we would like the ability to bypass tracing for certain routes (eg. health check endpoints).

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 24, 2021

CLA Signed

The committers are authorized under a signed CLA.

@pcairns pcairns closed this Jun 24, 2021
@pcairns pcairns reopened this Jun 24, 2021
@Aneurysm9
Copy link
Member

@pcairns I think you may need to rebase this to eliminate commit 366d0ca. All commits must be from users that have signed the CLA.

@codecov
Copy link

codecov bot commented Jun 30, 2021

Codecov Report

Merging #829 (8ac37cc) into main (595663d) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #829   +/-   ##
=====================================
  Coverage   75.4%   75.4%           
=====================================
  Files         69      69           
  Lines       3064    3071    +7     
=====================================
+ Hits        2311    2318    +7     
  Misses       613     613           
  Partials     140     140           
Impacted Files Coverage Δ
...tation/github.com/labstack/echo/otelecho/config.go 100.0% <100.0%> (ø)
...entation/github.com/labstack/echo/otelecho/echo.go 95.4% <100.0%> (+0.4%) ⬆️

@pcairns pcairns requested a review from pellared as a code owner July 14, 2021 17:21
@pcairns pcairns force-pushed the add-skipper-to-echo-middleware branch from ad1634a to aea42e9 Compare July 14, 2021 17:35
@pcairns
Copy link
Contributor Author

pcairns commented Jul 14, 2021

@Aneurysm9 sorry I've been away on vacation, this should be rebased now

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one little comment to make the test(s) more trustworthy

other than that looks great 👍

@pcairns
Copy link
Contributor Author

pcairns commented Jul 16, 2021

I've updated the tests to include a check for the status code

@Aneurysm9 Aneurysm9 merged commit 0548aff into open-telemetry:main Jul 23, 2021
garrettwegan referenced this pull request in garrettwegan/opentelemetry-go-contrib Jul 28, 2021
* Added option to using a skipper in the echo otel middleware

* check status code in tests

* fix option interface use

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants