Skip to content

Conversation

@r4j4h
Copy link

@r4j4h r4j4h commented Sep 12, 2019

Updating typings to expressMiddleware to include non-optional serviceName parameter

Updating typings to expressMiddleware to include non-optional serviceName parameter
@jcchavezs
Copy link
Contributor

jcchavezs commented Sep 12, 2019 via email

@r4j4h
Copy link
Author

r4j4h commented Sep 12, 2019

Alternatively we should define it as optional, as it ultimately just passes through to https://github.com/openzipkin/zipkin-js/blob/master/packages/zipkin/src/instrumentation/httpServer.js#L31 and there it is optional. LMK and I can adjust this MR :)

*/
export declare function expressMiddleware(
options: {tracer: Tracer, port?: number}
options: {tracer: Tracer, serviceName: string, port?: number}
Copy link
Member

Choose a reason for hiding this comment

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

we intentionally don't document this as it is usually a mistake to have a difference between middleware service name and tracer. this causes graphs to mess up. You may notice that there are a few pull requests to change readmes to not use this. Also, I except once we figure out how deprecation works, we'd remove it eventually.

What impact is it causing to leave this out?

@jcchavezs
Copy link
Contributor

jcchavezs commented Nov 20, 2019

I am with @adriancole on this so I will close this PR for now and add the deprecation message in the options. In any case, thanks a lot @r4j4h for the willingness to contribute!

@jcchavezs
Copy link
Contributor

Related to this: #457

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.

3 participants