open-telemetry / opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
https://opentelemetry.io/
Apache License 2.0
1.08k stars 509 forks source link

WithInstrumentationScope change needs getstarted updates #5706

Closed xorima closed 1 month ago

xorima commented 1 month ago

Description

Type: Documentation Under: https://opentelemetry.io/docs/languages/go/getting-started/#add-custom-instrumentation there is a part of the guide where the code uses:

    logger = otelslog.NewLogger(
        otelslog.WithInstrumentationScope(instrumentation.Scope{
            Name: name,
        }),
    )

with changes in 1.27.0 https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.27.0 this func was replaced so the get started should also be updated

Steps To Reproduce

Follow the get started guide, code fails to work due to renamed function

Expected behavior

Guide to show us how to get things working correctly.

dmathieu commented 1 month ago

Fixed in https://github.com/open-telemetry/opentelemetry.io/pull/4577