Skip to content

Commit e694aae

Browse files
committed
chore(node): Format code with Prettier
1 parent 2a6cd6e commit e694aae

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

packages/node/src/integrations/tracing/hono/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import { HonoInstrumentation } from './instrumentation';
55

66
const INTEGRATION_NAME = 'Hono';
77

8-
export const instrumentHono = generateInstrumentOnce(
9-
INTEGRATION_NAME,
10-
() => new HonoInstrumentation(),
11-
);
8+
export const instrumentHono = generateInstrumentOnce(INTEGRATION_NAME, () => new HonoInstrumentation());
129

1310
const _honoIntegration = (() => {
1411
return {

packages/node/src/integrations/tracing/hono/instrumentation.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InstrumentationBase,InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
1+
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
22
import type { HandlerInterface, Hono, HonoInstance, MiddlewareHandlerInterface, OnHandlerInterface } from './types';
33

44
const PACKAGE_NAME = '@sentry/instrumentation-hono';
@@ -17,11 +17,7 @@ export class HonoInstrumentation extends InstrumentationBase {
1717
*/
1818
public init(): InstrumentationNodeModuleDefinition[] {
1919
return [
20-
new InstrumentationNodeModuleDefinition(
21-
'hono',
22-
['>=4.0.0 <5'],
23-
moduleExports => this._patch(moduleExports),
24-
),
20+
new InstrumentationNodeModuleDefinition('hono', ['>=4.0.0 <5'], moduleExports => this._patch(moduleExports)),
2521
];
2622
}
2723

@@ -54,7 +50,7 @@ export class HonoInstrumentation extends InstrumentationBase {
5450
* Patches the route handler to instrument it.
5551
*/
5652
private _patchHandler(): (original: HandlerInterface) => HandlerInterface {
57-
return function(original: HandlerInterface) {
53+
return function (original: HandlerInterface) {
5854
return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {
5955
// TODO: Add OpenTelemetry tracing logic here
6056
return original.apply(this, args);
@@ -66,7 +62,7 @@ export class HonoInstrumentation extends InstrumentationBase {
6662
* Patches the 'on' handler to instrument it.
6763
*/
6864
private _patchOnHandler(): (original: OnHandlerInterface) => OnHandlerInterface {
69-
return function(original: OnHandlerInterface) {
65+
return function (original: OnHandlerInterface) {
7066
return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {
7167
// TODO: Add OpenTelemetry tracing logic here
7268
return original.apply(this, args);
@@ -78,7 +74,7 @@ export class HonoInstrumentation extends InstrumentationBase {
7874
* Patches the middleware handler to instrument it.
7975
*/
8076
private _patchMiddlewareHandler(): (original: MiddlewareHandlerInterface) => MiddlewareHandlerInterface {
81-
return function(original: MiddlewareHandlerInterface) {
77+
return function (original: MiddlewareHandlerInterface) {
8278
return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {
8379
// TODO: Add OpenTelemetry tracing logic here
8480
return original.apply(this, args);

packages/node/src/integrations/tracing/hono/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export interface HonoInstance {
4040
post: HandlerInterface;
4141
put: HandlerInterface;
4242
delete: HandlerInterface;
43-
options:HandlerInterface;
44-
patch:HandlerInterface;
43+
options: HandlerInterface;
44+
patch: HandlerInterface;
4545
all: HandlerInterface;
4646
on: OnHandlerInterface;
4747
use: MiddlewareHandlerInterface;

0 commit comments

Comments
 (0)