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

feat: adding Koa instrumentation #144

Merged
merged 16 commits into from
Aug 18, 2020
Merged

Conversation

carolinee21
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

  • This instrumentation adds traces to middleware for both the Koa core and Koa Router modules.

  • Some example traces are shown here: Example Koa Instrumentation in Zipkin

  • User friendly example code is also added under examples/koa

@carolinee21 carolinee21 requested a review from a team July 17, 2020 15:39
@codecov
Copy link

codecov bot commented Jul 17, 2020

Codecov Report

Merging #144 into master will increase coverage by 0.29%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #144      +/-   ##
==========================================
+ Coverage   94.31%   94.61%   +0.29%     
==========================================
  Files          77       84       +7     
  Lines        3836     4124     +288     
  Branches      415      432      +17     
==========================================
+ Hits         3618     3902     +284     
- Misses        218      222       +4     
Impacted Files Coverage Δ
.../node/opentelemetry-koa-instrumentation/src/koa.ts 98.00% <0.00%> (ø)
...e/opentelemetry-koa-instrumentation/src/version.ts 100.00% <0.00%> (ø)
...opentelemetry-koa-instrumentation/test/koa.test.ts 99.08% <0.00%> (ø)
...ode/opentelemetry-koa-instrumentation/src/types.ts 100.00% <0.00%> (ø)
...emetry-koa-instrumentation/test/koa-router.test.ts 99.09% <0.00%> (ø)
...ode/opentelemetry-koa-instrumentation/.eslintrc.js 0.00% <0.00%> (ø)
...ode/opentelemetry-koa-instrumentation/src/utils.ts 100.00% <0.00%> (ø)

chore: add tslint

chore: add standard license

chore: add npmignore

chore: initial package config

docs: initial README

chore: create initial structure

chore: adds traces to Application.use method itself (on instantiation)

feat: traces for app.use

chore: update typescript version

chore: return original layer result

chore: remove app.use span based on design

chore: refactor span attribute assignments into util

chore: add router types

feat: added tracing for koa-router functions and routes

feat: don't create koa spans without root span

feat: added base tests for Koa core and Koa router

chore: finalizing plugin

feat: added kLayerPatched check

test: creating example code for Koa plugin

chore: cleaning up code

chore: update README

chore: update README

chore: update README

chore: add async middleware tests

chore: improve sample code

Add files via upload

Add files via upload

Add files via upload

chore: add jaeger example

Add files via upload

chore: add linter to example code

chore: rename plugin to instrumentation

chore: cleaning tests/examples

Add files via upload

Add files via upload

chore: fix async example code and span timing

chore: refine test style

docs: add comments to plugin patching operations

chore: file cleanup

chore: fix code style
@mayurkale22 mayurkale22 requested a review from a team July 17, 2020 17:31
@carolinee21 carolinee21 changed the title Adding Koa Instrumentation feat: adding Koa instrumentation Jul 29, 2020
Copy link
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

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

Please bump all core dependencies to 0.12.2

examples/koa/package.json Outdated Show resolved Hide resolved
Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

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

Please bump all core dependencies to 0.12.2

I think @dyladan meant 0.10.2

examples/koa/package.json Outdated Show resolved Hide resolved
@carolinee21
Copy link
Contributor Author

@dyladan @obecny @michaelgoin Now that the other PR has been merged, this one is unblocked and should be ready to go!

@obecny
Copy link
Member

obecny commented Aug 10, 2020

@dyladan @obecny @michaelgoin Now that the other PR has been merged, this one is unblocked and should be ready to go!

@dyladan requested changes, wait for him to approve first

@carolinee21
Copy link
Contributor Author

@dyladan Hi Daniel! Please let me know if there's anything else missing from me on this or the Hapi PR. Thanks! :)

@obecny obecny merged commit 17005e4 into open-telemetry:master Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin for Koa
6 participants