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

[Hapi Plugin] Hapi instrumentation route handler wrapping issue #220

Closed
jk1z opened this issue Oct 12, 2020 · 0 comments
Closed

[Hapi Plugin] Hapi instrumentation route handler wrapping issue #220

jk1z opened this issue Oct 12, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@jk1z
Copy link
Contributor

jk1z commented Oct 12, 2020

What version of OpenTelemetry are you using?

"@opentelemetry/core": "^0.11.0",
"@opentelemetry/exporter-jaeger": "^0.11.0",
"@opentelemetry/hapi-instrumentation": "^0.10.0",
"@opentelemetry/node": "^0.11.0",
"@opentelemetry/plugin-http": "^0.11.0",
"@opentelemetry/plugin-https": "^0.11.0",
"@opentelemetry/plugin-mongodb": "^0.10.0",
"@opentelemetry/plugin-redis": "^0.10.0",
"@opentelemetry/tracing": "^0.11.0",

What version of Node are you using?

v14.2.0

What did you do?

Current Hapi plugin doesn't support handler wrapping if it's using another route object format.

server.route({
        method: 'GET',
        path: '/',
        options: {
          handler: (request, h) => {
            return 'Hello World!';
          },
        },
});

Notice above, the handler is inside of the options attribute rather than in the root object level.

What did you expect to see?

Hapi plugin to support the other format of the route object.

What did you see instead?

Hapi plugin doesn't wrap the handler in the other route object format

Additional context

https://hapi.dev/api/?v=20.0.0#-routeoptionshandler

@jk1z jk1z added the bug Something isn't working label Oct 12, 2020
@jk1z jk1z closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant