You've already forked opentelemetry-go
							
							
				mirror of
				https://github.com/open-telemetry/opentelemetry-go.git
				synced 2025-10-31 00:07:40 +02:00 
			
		
		
		
	docs(typos): Run codespell to fix typos (#3980)
* docs(typos): Run codespell to fix typos There were a lot of typos through the repository, so I ran [codespell][], a tool for automatically fixing typos, to fix them. ```console make codespell ``` There's already a tool called [misspell][] that's supposed to take care of this, but misspell hasn't been updated for 6 years, and it doesn't seem to be catching any of the typos that codespell can. [codespell]: https://github.com/codespell-project/codespell [misspell]: https://github.com/client9/misspell * Revert and ignore spelling for Consequentially * Add GH workflow for codespell * Revert GH Workflow and Makefile for codespell Per @pellared, since there's no instructions for setting up codespell, it was suggested that the changes for setting up a workflow and section in Makefile include instructions for setting up codespell as well. * Revert spelling on consequently --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/changelog.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/changelog.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| # This action requires that any PR targeting the main branch should touch at | ||||
| # least one CHANGELOG file. If a CHANGELOG entry is not required, or if | ||||
| # performing maintance on the Changelog, add either \"[chore]\" to the title of | ||||
| # performing maintenance on the Changelog, add either \"[chore]\" to the title of | ||||
| # the pull request or add the \"Skip Changelog\" label to disable this action. | ||||
|  | ||||
| name: changelog | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -118,7 +118,7 @@ jobs: | ||||
|         go-version: ["1.20", 1.19] | ||||
|         os: [ubuntu-latest, macos-latest, windows-latest] | ||||
|         # GitHub Actions does not support arm* architectures on default | ||||
|         # runners. It is possible to acomplish this with a self-hosted runner | ||||
|         # runners. It is possible to accomplish this with a self-hosted runner | ||||
|         # if we want to add this in the future: | ||||
|         # https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow | ||||
|         arch: ["386", amd64] | ||||
|   | ||||
							
								
								
									
										14
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -222,7 +222,7 @@ The next release will require at least [Go 1.19]. | ||||
| - The `go.opentelemetry.io/otel/semconv/v1.16.0` package. | ||||
|   The package contains semantic conventions from the `v1.16.0` version of the OpenTelemetry specification. (#3579) | ||||
| - Metric instruments to `go.opentelemetry.io/otel/metric/instrument`. | ||||
|   These instruments are use as replacements of the depreacted `go.opentelemetry.io/otel/metric/instrument/{asyncfloat64,asyncint64,syncfloat64,syncint64}` packages.(#3575, #3586) | ||||
|   These instruments are use as replacements of the deprecated `go.opentelemetry.io/otel/metric/instrument/{asyncfloat64,asyncint64,syncfloat64,syncint64}` packages.(#3575, #3586) | ||||
|   - `Float64ObservableCounter` replaces the `asyncfloat64.Counter` | ||||
|   - `Float64ObservableUpDownCounter` replaces the `asyncfloat64.UpDownCounter` | ||||
|   - `Float64ObservableGauge` replaces the `asyncfloat64.Gauge` | ||||
| @@ -245,7 +245,7 @@ The next release will require at least [Go 1.19]. | ||||
| ### Changed | ||||
|  | ||||
| - Jaeger and Zipkin exporter use `github.com/go-logr/logr` as the logging interface, and add the `WithLogr` option. (#3497, #3500) | ||||
| - Instrument configuration in `go.opentelemetry.io/otel/metric/instrument` is split into specific options and confguration based on the instrument type. (#3507) | ||||
| - Instrument configuration in `go.opentelemetry.io/otel/metric/instrument` is split into specific options and configuration based on the instrument type. (#3507) | ||||
|   - Use the added `Int64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncint64`. | ||||
|   - Use the added `Float64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncfloat64`. | ||||
|   - Use the added `Int64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncint64`. | ||||
| @@ -258,7 +258,7 @@ The next release will require at least [Go 1.19]. | ||||
| - The `Shutdown` method of the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` releases all computational resources when called the first time. (#3551) | ||||
| - The `Sampler` returned from `TraceIDRatioBased` `go.opentelemetry.io/otel/sdk/trace` now uses the rightmost bits for sampling decisions. | ||||
|   This fixes random sampling when using ID generators like `xray.IDGenerator` and increasing parity with other language implementations. (#3557) | ||||
| - Errors from `go.opentelemetry.io/otel/exporters/otlp/otlptrace` exporters are wrapped in erros identifying their signal name. | ||||
| - Errors from `go.opentelemetry.io/otel/exporters/otlp/otlptrace` exporters are wrapped in errors identifying their signal name. | ||||
|   Existing users of the exporters attempting to identify specific errors will need to use `errors.Unwrap()` to get the underlying error. (#3516) | ||||
| - Exporters from `go.opentelemetry.io/otel/exporters/otlp` will print the final retryable error message when attempts to retry time out. (#3514) | ||||
| - The instrument kind names in `go.opentelemetry.io/otel/sdk/metric` are updated to match the API. (#3562) | ||||
| @@ -367,7 +367,7 @@ The next release will require at least [Go 1.19]. | ||||
| - Asynchronous counters (`Counter` and `UpDownCounter`) from the metric SDK now produce delta sums when configured with delta temporality. (#3398) | ||||
| - Exported `Status` codes in the `go.opentelemetry.io/otel/exporters/zipkin` exporter are now exported as all upper case values. (#3340) | ||||
| - `Aggregation`s from `go.opentelemetry.io/otel/sdk/metric` with no data are not exported. (#3394, #3436) | ||||
| - Reenabled Attribute Filters in the Metric SDK. (#3396) | ||||
| - Re-enabled Attribute Filters in the Metric SDK. (#3396) | ||||
| - Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggragation. (#3408) | ||||
| - Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432) | ||||
| - Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440) | ||||
| @@ -948,7 +948,7 @@ This release includes an API and SDK for the tracing signal that will comply wit | ||||
| - Setting the global `ErrorHandler` with `"go.opentelemetry.io/otel".SetErrorHandler` multiple times is now supported. (#2160, #2140) | ||||
| - The `"go.opentelemetry.io/otel/attribute".Any` function now supports `int32` values. (#2169) | ||||
| - Multiple calls to `"go.opentelemetry.io/otel/sdk/metric/controller/basic".WithResource()` are handled correctly, and when no resources are provided `"go.opentelemetry.io/otel/sdk/resource".Default()` is used. (#2120) | ||||
| - The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly ommit timestamps. (#2195) | ||||
| - The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly omit timestamps. (#2195) | ||||
| - Fixed typos in resources.go. (#2201) | ||||
|  | ||||
| ## [1.0.0-RC2] - 2021-07-26 | ||||
| @@ -1394,7 +1394,7 @@ with major version 0. | ||||
| - `NewGRPCDriver` function returns a `ProtocolDriver` that maintains a single gRPC connection to the collector. (#1369) | ||||
| - Added documentation about the project's versioning policy. (#1388) | ||||
| - Added `NewSplitDriver` for OTLP exporter that allows sending traces and metrics to different endpoints. (#1418) | ||||
| - Added codeql worfklow to GitHub Actions (#1428) | ||||
| - Added codeql workflow to GitHub Actions (#1428) | ||||
| - Added Gosec workflow to GitHub Actions (#1429) | ||||
| - Add new HTTP driver for OTLP exporter in `exporters/otlp/otlphttp`. Currently it only supports the binary protobuf payloads. (#1420) | ||||
| - Add an OpenCensus exporter bridge. (#1444) | ||||
| @@ -2237,7 +2237,7 @@ There is still a possibility of breaking changes. | ||||
|  | ||||
| ### Fixed | ||||
|  | ||||
| - Use stateful batcher on Prometheus exporter fixing regresion introduced in #395. (#428) | ||||
| - Use stateful batcher on Prometheus exporter fixing regression introduced in #395. (#428) | ||||
|  | ||||
| ## [0.2.1] - 2020-01-08 | ||||
|  | ||||
|   | ||||
| @@ -244,7 +244,7 @@ Meaning a `config` from one package should not be directly used by another. The | ||||
| one exception is the API packages.  The configs from the base API, eg. | ||||
| `go.opentelemetry.io/otel/trace.TracerConfig` and | ||||
| `go.opentelemetry.io/otel/metric.InstrumentConfig`, are intended to be consumed | ||||
| by the SDK therefor it is expected that these are exported. | ||||
| by the SDK therefore it is expected that these are exported. | ||||
|  | ||||
| When a config is exported we want to maintain forward and backward | ||||
| compatibility, to achieve this no fields should be exported but should | ||||
| @@ -262,12 +262,12 @@ func newConfig(options ...Option) config { | ||||
| 	for _, option := range options { | ||||
| 		config = option.apply(config) | ||||
| 	} | ||||
| 	// Preform any validation here. | ||||
| 	// Perform any validation here. | ||||
| 	return config | ||||
| } | ||||
| ``` | ||||
|  | ||||
| If validation of the `config` options is also preformed this can return an | ||||
| If validation of the `config` options is also performed this can return an | ||||
| error as well that is expected to be handled by the instantiation function | ||||
| or propagated to the user. | ||||
|  | ||||
| @@ -466,7 +466,7 @@ their parameters appropriately named. | ||||
| #### Interface Stability | ||||
|  | ||||
| All exported stable interfaces that include the following warning in their | ||||
| doumentation are allowed to be extended with additional methods. | ||||
| documentation are allowed to be extended with additional methods. | ||||
|  | ||||
| > Warning: methods may be added to this interface in minor releases. | ||||
|  | ||||
|   | ||||
| @@ -73,7 +73,7 @@ func TestSpanContextConversion(t *testing.T) { | ||||
| 		t.Run(tc.description, func(t *testing.T) { | ||||
| 			output := SpanContext(tc.input) | ||||
| 			if !output.Equal(tc.expected) { | ||||
| 				t.Fatalf("Got %+v spancontext, exepected %+v.", output, tc.expected) | ||||
| 				t.Fatalf("Got %+v spancontext, expected %+v.", output, tc.expected) | ||||
| 			} | ||||
| 		}) | ||||
| 	} | ||||
|   | ||||
| @@ -60,7 +60,7 @@ func TestSpanContextConversion(t *testing.T) { | ||||
| 		t.Run(tc.description, func(t *testing.T) { | ||||
| 			output := SpanContext(tc.input) | ||||
| 			if output != tc.expected { | ||||
| 				t.Fatalf("Got %+v spancontext, exepected %+v.", output, tc.expected) | ||||
| 				t.Fatalf("Got %+v spancontext, expected %+v.", output, tc.expected) | ||||
| 			} | ||||
| 		}) | ||||
| 	} | ||||
|   | ||||
| @@ -55,7 +55,7 @@ func (s *Span) IsRecordingEvents() bool { | ||||
| 	return s.otelSpan.IsRecording() | ||||
| } | ||||
|  | ||||
| // End ends thi span. | ||||
| // End ends this span. | ||||
| func (s *Span) End() { | ||||
| 	s.otelSpan.End() | ||||
| } | ||||
|   | ||||
| @@ -60,7 +60,7 @@ func TestMixedAPIs(t *testing.T) { | ||||
| 		for _, span := range spans { | ||||
| 			t.Logf("Span: %s", span.Name()) | ||||
| 		} | ||||
| 		t.Fatalf("Got %d spans, exepected %d.", len(spans), 4) | ||||
| 		t.Fatalf("Got %d spans, expected %d.", len(spans), 4) | ||||
| 	} | ||||
|  | ||||
| 	var parent trace.SpanContext | ||||
| @@ -86,11 +86,11 @@ func TestStartOptions(t *testing.T) { | ||||
| 	spans := sr.Ended() | ||||
|  | ||||
| 	if len(spans) != 1 { | ||||
| 		t.Fatalf("Got %d spans, exepected %d", len(spans), 1) | ||||
| 		t.Fatalf("Got %d spans, expected %d", len(spans), 1) | ||||
| 	} | ||||
|  | ||||
| 	if spans[0].SpanKind() != trace.SpanKindClient { | ||||
| 		t.Errorf("Got span kind %v, exepected %d", spans[0].SpanKind(), trace.SpanKindClient) | ||||
| 		t.Errorf("Got span kind %v, expected %d", spans[0].SpanKind(), trace.SpanKindClient) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @@ -109,7 +109,7 @@ func TestStartSpanWithRemoteParent(t *testing.T) { | ||||
| 	spans := sr.Ended() | ||||
|  | ||||
| 	if len(spans) != 1 { | ||||
| 		t.Fatalf("Got %d spans, exepected %d", len(spans), 1) | ||||
| 		t.Fatalf("Got %d spans, expected %d", len(spans), 1) | ||||
| 	} | ||||
|  | ||||
| 	if psid := spans[0].Parent().SpanID(); psid != parent.SpanContext().SpanID() { | ||||
| @@ -142,7 +142,7 @@ func TestToFromContext(t *testing.T) { | ||||
| 	spans := sr.Ended() | ||||
|  | ||||
| 	if len(spans) != 2 { | ||||
| 		t.Fatalf("Got %d spans, exepected %d.", len(spans), 2) | ||||
| 		t.Fatalf("Got %d spans, expected %d.", len(spans), 2) | ||||
| 	} | ||||
|  | ||||
| 	var parent trace.SpanContext | ||||
| @@ -209,7 +209,7 @@ func TestSetThings(t *testing.T) { | ||||
| 	spans := sr.Ended() | ||||
|  | ||||
| 	if len(spans) != 1 { | ||||
| 		t.Fatalf("Got %d spans, exepected %d.", len(spans), 1) | ||||
| 		t.Fatalf("Got %d spans, expected %d.", len(spans), 1) | ||||
| 	} | ||||
| 	s := spans[0] | ||||
|  | ||||
|   | ||||
| @@ -33,7 +33,7 @@ func NewTracerPair(tracer trace.Tracer) (*BridgeTracer, *WrapperTracerProvider) | ||||
| 	return bridgeTracer, wrapperProvider | ||||
| } | ||||
|  | ||||
| // NewTracerPairWithContext is a convience function. It calls NewTracerPair | ||||
| // NewTracerPairWithContext is a convenience function. It calls NewTracerPair | ||||
| // and returns a hooked version of ctx with the created BridgeTracer along | ||||
| // with the BridgeTracer and WrapperTracerProvider. | ||||
| func NewTracerPairWithContext(ctx context.Context, tracer trace.Tracer) (context.Context, *BridgeTracer, *WrapperTracerProvider) { | ||||
|   | ||||
| @@ -77,7 +77,7 @@ const ( | ||||
| // WrapTException wraps an error into TException. | ||||
| // | ||||
| // If err is nil or already TException, it's returned as-is. | ||||
| // Otherwise it will be wraped into TException with TExceptionType() returning | ||||
| // Otherwise it will be wrapped into TException with TExceptionType() returning | ||||
| // TExceptionTypeUnknown, and Unwrap() returning the original error. | ||||
| func WrapTException(err error) TException { | ||||
| 	if err == nil { | ||||
|   | ||||
| @@ -56,7 +56,7 @@ type stringWriter interface { | ||||
| 	WriteString(s string) (n int, err error) | ||||
| } | ||||
|  | ||||
| // This is "enchanced" transport with extra capabilities. You need to use one of these | ||||
| // This is "enhanced" transport with extra capabilities. You need to use one of these | ||||
| // to construct protocol. | ||||
| // Notably, TSocket does not implement this interface, and it is always a mistake to use | ||||
| // TSocket directly in protocol. | ||||
|   | ||||
| @@ -40,7 +40,7 @@ const ( | ||||
| 	LIST   = 15 | ||||
| 	UTF8   = 16 | ||||
| 	UTF16  = 17 | ||||
| 	//BINARY = 18   wrong and unusued | ||||
| 	//BINARY = 18   wrong and unused | ||||
| ) | ||||
|  | ||||
| var typeNames = map[int]string{ | ||||
|   | ||||
| @@ -146,7 +146,7 @@ func waitForConnCondition(conn *reconnectingUDPConn, condition func(conn *reconn | ||||
|  | ||||
| func newMockUDPAddr(t *testing.T, port int) *net.UDPAddr { | ||||
| 	buf := make([]byte, 4) | ||||
| 	// random is not seeded to ensure tests are deterministic (also doesnt matter if ip is valid) | ||||
| 	// random is not seeded to ensure tests are deterministic (also does not matter if ip is valid) | ||||
| 	_, err := rand.Read(buf) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
|   | ||||
| @@ -98,7 +98,7 @@ type GRPCCollector struct { | ||||
| // NewGRPCCollector returns a *GRPCCollector that is listening at the provided | ||||
| // endpoint. | ||||
| // | ||||
| // If endpoint is an empty string, the returned collector will be listeing on | ||||
| // If endpoint is an empty string, the returned collector will be listening on | ||||
| // the localhost interface at an OS chosen port. | ||||
| // | ||||
| // If errCh is not nil, the collector will respond to Export calls with errors | ||||
| @@ -204,7 +204,7 @@ type HTTPCollector struct { | ||||
| // NewHTTPCollector returns a *HTTPCollector that is listening at the provided | ||||
| // endpoint. | ||||
| // | ||||
| // If endpoint is an empty string, the returned collector will be listeing on | ||||
| // If endpoint is an empty string, the returned collector will be listening on | ||||
| // the localhost interface at an OS chosen port, not use TLS, and listen at the | ||||
| // default OTLP metric endpoint path ("/v1/metrics"). If the endpoint contains | ||||
| // a prefix of "https" the server will generate weak self-signed TLS | ||||
|   | ||||
| @@ -336,7 +336,7 @@ func TestSantitizeName(t *testing.T) { | ||||
| 		input string | ||||
| 		want  string | ||||
| 	}{ | ||||
| 		{"nam€_with_3_width_rune", "nam__with_3_width_rune"}, | ||||
| 		{"name€_with_4_width_rune", "name__with_4_width_rune"}, | ||||
| 		{"`", "_"}, | ||||
| 		{ | ||||
| 			`! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWKYZ[]\^_abcdefghijklmnopqrstuvwkyz{|}~`, | ||||
|   | ||||
| @@ -93,7 +93,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| // Shutdown is called to stop the exporter, it preforms no action. | ||||
| // Shutdown is called to stop the exporter, it performs no action. | ||||
| func (e *Exporter) Shutdown(ctx context.Context) error { | ||||
| 	e.stoppedMu.Lock() | ||||
| 	e.stopped = true | ||||
|   | ||||
| @@ -121,7 +121,7 @@ type Meter interface { | ||||
|  | ||||
| // Callback is a function registered with a Meter that makes observations for | ||||
| // the set of instruments it is registered with. The Observer parameter is used | ||||
| // to record measurment observations for these instruments. | ||||
| // to record measurement observations for these instruments. | ||||
| // | ||||
| // The function needs to complete in a finite amount of time and the deadline | ||||
| // of the passed context is expected to be honored. | ||||
|   | ||||
| @@ -82,7 +82,7 @@ func TestExtractValidTraceContext(t *testing.T) { | ||||
| 			}), | ||||
| 		}, | ||||
| 		{ | ||||
| 			name: "invalid tracestate perserves traceparent", | ||||
| 			name: "invalid tracestate preserves traceparent", | ||||
| 			header: http.Header{ | ||||
| 				traceparent: []string{"00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00"}, | ||||
| 				tracestate:  []string{"invalid$@#=invalid"}, | ||||
|   | ||||
| @@ -129,7 +129,7 @@ func benchCollectHistograms(count int) func(*testing.B) { | ||||
| 		h.Record(ctx, 1) | ||||
| 	} | ||||
|  | ||||
| 	// Store bechmark results in a closure to prevent the compiler from | ||||
| 	// Store benchmark results in a closure to prevent the compiler from | ||||
| 	// inlining and skipping the function. | ||||
| 	var ( | ||||
| 		collectedMetrics metricdata.ResourceMetrics | ||||
|   | ||||
| @@ -30,7 +30,7 @@ type cache[K comparable, V any] struct { | ||||
| 	data map[K]V | ||||
| } | ||||
|  | ||||
| // Lookup returns the value stored in the cache with the accociated key if it | ||||
| // Lookup returns the value stored in the cache with the associated key if it | ||||
| // exists. Otherwise, f is called and its returned value is set in the cache | ||||
| // for key and returned. | ||||
| // | ||||
|   | ||||
| @@ -290,7 +290,7 @@ func (o *observable[N]) observe(val N, attrs []attribute.KeyValue) { | ||||
| var errEmptyAgg = errors.New("no aggregators for observable instrument") | ||||
|  | ||||
| // registerable returns an error if the observable o should not be registered, | ||||
| // and nil if it should. An errEmptyAgg error is returned if o is effecively a | ||||
| // and nil if it should. An errEmptyAgg error is returned if o is effectively a | ||||
| // no-op because it does not have any aggregators. Also, an error is returned | ||||
| // if scope defines a Meter other than the one o was created by. | ||||
| func (o *observable[N]) registerable(scope instrumentation.Scope) error { | ||||
|   | ||||
| @@ -70,7 +70,7 @@ type expectFunc func(m int) metricdata.Aggregation | ||||
| // made MeasurementN number of times. This will be done in GoroutineN number | ||||
| // of different goroutines. After the Aggregator has been asked to aggregate | ||||
| // all these measurements, it is validated using a passed expecterFunc. This | ||||
| // set of operation is a signle cycle, and the the aggregatorTester will run | ||||
| // set of operation is a single cycle, and the the aggregatorTester will run | ||||
| // CycleN number of cycles. | ||||
| type aggregatorTester[N int64 | float64] struct { | ||||
| 	// GoroutineN is the number of goroutines aggregatorTester will use to run | ||||
|   | ||||
| @@ -499,7 +499,7 @@ func TestRegisterNonSDKObserverErrors(t *testing.T) { | ||||
| 		t, | ||||
| 		err, | ||||
| 		"invalid observable: from different implementation", | ||||
| 		"External instrument registred", | ||||
| 		"External instrument registered", | ||||
| 	) | ||||
| } | ||||
|  | ||||
| @@ -521,13 +521,13 @@ func TestMeterMixingOnRegisterErrors(t *testing.T) { | ||||
| 		t, | ||||
| 		err, | ||||
| 		`invalid registration: observable "int64 ctr" from Meter "scope2", registered with Meter "scope1"`, | ||||
| 		"Instrument registred with non-creation Meter", | ||||
| 		"Instrument registered with non-creation Meter", | ||||
| 	) | ||||
| 	assert.ErrorContains( | ||||
| 		t, | ||||
| 		err, | ||||
| 		`invalid registration: observable "float64 ctr" from Meter "scope2", registered with Meter "scope1"`, | ||||
| 		"Instrument registred with non-creation Meter", | ||||
| 		"Instrument registered with non-creation Meter", | ||||
| 	) | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -455,7 +455,7 @@ func compareDiff[T any](extraExpected, extraActual []T) string { | ||||
| 		return "" | ||||
| 	} | ||||
|  | ||||
| 	formater := func(v T) string { | ||||
| 	formatter := func(v T) string { | ||||
| 		return fmt.Sprintf("%#v", v) | ||||
| 	} | ||||
|  | ||||
| @@ -463,14 +463,14 @@ func compareDiff[T any](extraExpected, extraActual []T) string { | ||||
| 	if len(extraExpected) > 0 { | ||||
| 		_, _ = msg.WriteString("missing expected values:\n") | ||||
| 		for _, v := range extraExpected { | ||||
| 			_, _ = msg.WriteString(formater(v) + "\n") | ||||
| 			_, _ = msg.WriteString(formatter(v) + "\n") | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if len(extraActual) > 0 { | ||||
| 		_, _ = msg.WriteString("unexpected additional values:\n") | ||||
| 		for _, v := range extraActual { | ||||
| 			_, _ = msg.WriteString(formater(v) + "\n") | ||||
| 			_, _ = msg.WriteString(formatter(v) + "\n") | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -280,7 +280,7 @@ func benchReaderCollectFunc(r Reader) func(*testing.B) { | ||||
| 	ctx := context.Background() | ||||
| 	r.register(testSDKProducer{}) | ||||
|  | ||||
| 	// Store bechmark results in a closure to prevent the compiler from | ||||
| 	// Store benchmark results in a closure to prevent the compiler from | ||||
| 	// inlining and skipping the function. | ||||
| 	var ( | ||||
| 		collectedMetrics metricdata.ResourceMetrics | ||||
|   | ||||
| @@ -91,7 +91,7 @@ var _ SpanProcessor = (*batchSpanProcessor)(nil) | ||||
| // NewBatchSpanProcessor creates a new SpanProcessor that will send completed | ||||
| // span batches to the exporter with the supplied options. | ||||
| // | ||||
| // If the exporter is nil, the span processor will preform no action. | ||||
| // If the exporter is nil, the span processor will perform no action. | ||||
| func NewBatchSpanProcessor(exporter SpanExporter, options ...BatchSpanProcessorOption) SpanProcessor { | ||||
| 	maxQueueSize := env.BatchSpanProcessorMaxQueueSize(DefaultMaxQueueSize) | ||||
| 	maxExportBatchSize := env.BatchSpanProcessorMaxExportBatchSize(DefaultMaxExportBatchSize) | ||||
|   | ||||
| @@ -302,7 +302,7 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) { | ||||
| // most a length of limit. Each string slice value is truncated in this fashion | ||||
| // (the slice length itself is unaffected). | ||||
| // | ||||
| // No truncation is perfromed for a negative limit. | ||||
| // No truncation is performed for a negative limit. | ||||
| func truncateAttr(limit int, attr attribute.KeyValue) attribute.KeyValue { | ||||
| 	if limit < 0 { | ||||
| 		return attr | ||||
|   | ||||
| @@ -38,7 +38,7 @@ type SpanExporter interface { | ||||
| 	// must never be done outside of a new major release. | ||||
|  | ||||
| 	// Shutdown notifies the exporter of a pending halt to operations. The | ||||
| 	// exporter is expected to preform any cleanup or synchronization it | ||||
| 	// exporter is expected to perform any cleanup or synchronization it | ||||
| 	// requires while honoring all timeouts and cancellations contained in | ||||
| 	// the passed context. | ||||
| 	Shutdown(ctx context.Context) error | ||||
|   | ||||
| @@ -627,14 +627,14 @@ func TestSpanSetAttributes(t *testing.T) { | ||||
| 			roSpan := span.(ReadOnlySpan) | ||||
|  | ||||
| 			// Ensure the span itself is valid. | ||||
| 			assert.ElementsMatch(t, test.wantAttrs, roSpan.Attributes(), "exected attributes") | ||||
| 			assert.ElementsMatch(t, test.wantAttrs, roSpan.Attributes(), "expected attributes") | ||||
| 			assert.Equal(t, test.wantDropped, roSpan.DroppedAttributes(), "dropped attributes") | ||||
|  | ||||
| 			snap, ok := te.GetSpan(spanName) | ||||
| 			require.Truef(t, ok, "span %s not exported", spanName) | ||||
|  | ||||
| 			// Ensure the exported span snapshot is valid. | ||||
| 			assert.ElementsMatch(t, test.wantAttrs, snap.Attributes(), "exected attributes") | ||||
| 			assert.ElementsMatch(t, test.wantAttrs, snap.Attributes(), "expected attributes") | ||||
| 			assert.Equal(t, test.wantDropped, snap.DroppedAttributes(), "dropped attributes") | ||||
| 		}) | ||||
| 	} | ||||
|   | ||||
| @@ -239,7 +239,7 @@ var ( | ||||
|  | ||||
| func BenchmarkNewTracerConfig(b *testing.B) { | ||||
| 	opts := []TracerOption{ | ||||
| 		WithInstrumentationVersion("testing verion"), | ||||
| 		WithInstrumentationVersion("testing version"), | ||||
| 		WithSchemaURL("testing URL"), | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -37,7 +37,7 @@ func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer { | ||||
| 	return noopTracer{} | ||||
| } | ||||
|  | ||||
| // noopTracer is an implementation of Tracer that preforms no operations. | ||||
| // noopTracer is an implementation of Tracer that performs no operations. | ||||
| type noopTracer struct{} | ||||
|  | ||||
| var _ Tracer = noopTracer{} | ||||
| @@ -53,7 +53,7 @@ func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption | ||||
| 	return ContextWithSpan(ctx, span), span | ||||
| } | ||||
|  | ||||
| // noopSpan is an implementation of Span that preforms no operations. | ||||
| // noopSpan is an implementation of Span that performs no operations. | ||||
| type noopSpan struct{} | ||||
|  | ||||
| var _ Span = noopSpan{} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user