Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Add Express example#577

Merged
mayurkale22 merged 2 commits into
census-instrumentation:masterfrom
mayurkale22:express_example
Jun 10, 2019
Merged

Add Express example#577
mayurkale22 merged 2 commits into
census-instrumentation:masterfrom
mayurkale22:express_example

Conversation

@mayurkale22

Copy link
Copy Markdown
Member

No description provided.

@mayurkale22

Copy link
Copy Markdown
Member Author

/cc @odeke-em

@odeke-em odeke-em left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM and thank you @mayurkale22! Just one thing we need to ensure that we let the users know about this change. They need to first initialize the tracer BEFORE creating the express app, otherwise users will spend hours debugging just like I did :)

Comment thread examples/express/index.js
serviceName: 'opencensus-express'
});

// Starts tracing and set sampling rate, exporter and propagation

@odeke-em odeke-em Jun 7, 2019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps let's add:

// NOTE: Please ensure that you start the tracer BEFORE initializing your express app

Comment thread examples/express/index.js
propagation: new propagation.B3Format(),
logLevel: 1 // show errors, if any
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps let's add:

// NOTE: Please ensure that you initialize your express app AFTER initializing the OpenCensus Tracer.

@mayurkale22

Copy link
Copy Markdown
Member Author

LGTM and thank you @mayurkale22! Just one thing we need to ensure that we let the users know about this change. They need to first initialize the tracer BEFORE creating the express app, otherwise users will spend hours debugging just like I did :)

Sure, I will do the needful. Thanks for suggestion!

@mayurkale22 mayurkale22 merged commit 62e1ac0 into census-instrumentation:master Jun 10, 2019
@mayurkale22 mayurkale22 deleted the express_example branch June 10, 2019 17:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants