Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257 changes: 250 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/instrumentation-koa/.tav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
koa:
# Testing ^2.7.0 covers at least 97% of the downloaded koa versions
versions:
include: "^2.7.0"
include: ">=2.7.0 <4"
mode: latest-minors
commands: npm run test
2 changes: 1 addition & 1 deletion packages/instrumentation-koa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ npm install --save @opentelemetry/instrumentation-koa

### Supported Versions

- [`koa`](https://www.npmjs.com/package/koa) versions `>=2.0.0 <3`
- [`koa`](https://www.npmjs.com/package/koa) versions `>=2.0.0 <4`
- [`@koa/router`](https://www.npmjs.com/package/@koa/router) versions `>=8.0.0`

## Usage
Expand Down
8 changes: 4 additions & 4 deletions packages/instrumentation-koa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"access": "public"
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
"@opentelemetry/api": "^1.9.0"
},
"devDependencies": {
"@koa/router": "14.0.0",
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-async-hooks": "^2.0.0",
"@opentelemetry/contrib-test-utils": "^0.51.0",
"@opentelemetry/instrumentation-http": "^0.205.0",
Expand All @@ -62,7 +62,7 @@
"@types/mocha": "10.0.10",
"@types/node": "18.18.14",
"@types/sinon": "17.0.4",
"koa": "2.16.2",
"koa": "3.0.1",
"nyc": "17.1.0",
"rimraf": "5.0.10",
"semver": "7.7.2",
Expand All @@ -73,7 +73,7 @@
"dependencies": {
"@opentelemetry/core": "^2.0.0",
"@opentelemetry/instrumentation": "^0.205.0",
"@opentelemetry/semantic-conventions": "^1.27.0"
"@opentelemetry/semantic-conventions": "^1.36.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-koa#readme"
}
2 changes: 1 addition & 1 deletion packages/instrumentation-koa/src/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class KoaInstrumentation extends InstrumentationBase<KoaInstrumentationCo
protected init() {
return new InstrumentationNodeModuleDefinition(
'koa',
['>=2.0.0 <3'],
['>=2.0.0 <4'],
(module: any) => {
const moduleExports: typeof koa =
module[Symbol.toStringTag] === 'Module'
Expand Down
4 changes: 2 additions & 2 deletions packages/instrumentation-koa/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { KoaLayerType, KoaInstrumentationConfig } from './types';
import { KoaContext, KoaMiddleware } from './internal-types';
import { AttributeNames } from './enums/AttributeNames';
import { Attributes } from '@opentelemetry/api';
import { SEMATTRS_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';
import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';

export const getMiddlewareMetadata = (
context: KoaContext,
Expand All @@ -33,7 +33,7 @@ export const getMiddlewareMetadata = (
attributes: {
[AttributeNames.KOA_NAME]: layerPath?.toString(),
[AttributeNames.KOA_TYPE]: KoaLayerType.ROUTER,
[SEMATTRS_HTTP_ROUTE]: layerPath?.toString(),
[ATTR_HTTP_ROUTE]: layerPath?.toString(),
},
name: context._matchedRouteName || `router - ${layerPath}`,
};
Expand Down
Loading
Loading