-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into remove_context_check
- Loading branch information
Showing
45 changed files
with
357 additions
and
2,943 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package otlploghttp_test | ||
|
||
import ( | ||
"context" | ||
|
||
"go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" | ||
"go.opentelemetry.io/otel/log/global" | ||
"go.opentelemetry.io/otel/sdk/log" | ||
) | ||
|
||
func Example() { | ||
ctx := context.Background() | ||
exp, err := otlploghttp.New(ctx) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
processor := log.NewBatchProcessor(exp) | ||
provider := log.NewLoggerProvider(log.WithProcessor(processor)) | ||
defer func() { | ||
if err := provider.Shutdown(ctx); err != nil { | ||
panic(err) | ||
} | ||
}() | ||
|
||
global.SetLoggerProvider(provider) | ||
|
||
// From here, the provider can be used by instrumentation to collect | ||
// telemetry. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/envconfig_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.