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:
parent
36b444a589
commit
0f0bd269c3
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user