1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00

Fix getting started example code (#2324)

This commit is contained in:
Tyler Yahn 2021-10-25 12:24:35 -07:00 committed by GitHub
parent 36b444a589
commit 0f0bd269c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,12 +53,12 @@ func NewApp(r io.Reader, l *log.Logger) *App {
// Run starts polling users for Fibonacci number requests and writes results.
func (a *App) Run(ctx context.Context) error {
for {
n, err := a.Poll()
n, err := a.Poll(ctx)
if err != nil {
return err
}
a.Write(n)
a.Write(ctx, n)
}
}