Documentation ¶
Overview ¶
* Copyright 2023 Caio Matheus Marcatti Calimério * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2023 Caio Matheus Marcatti Calimério * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- type ITelemetry
- type Telemetry
- func (t *Telemetry) CreateRootSpan(name string, optionalAttrs ...interface{}) oteltrace.Span
- func (t *Telemetry) EndSpan(span oteltrace.Span, err error)
- func (t *Telemetry) GetTraceID(span oteltrace.Span) oteltrace.TraceID
- func (t *Telemetry) Shutdown()
- func (t *Telemetry) StartChildSpan(name string, optionalAttrs ...interface{}) oteltrace.Span
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ITelemetry ¶
type ITelemetry interface { CreateRootSpan(name string, optionalAttrs ...interface{}) oteltrace.Span StartChildSpan(name string, optionalAttrs ...interface{}) oteltrace.Span EndSpan(span oteltrace.Span, err error) GetTraceID(span oteltrace.Span) oteltrace.TraceID Shutdown() }
TelemetryInterface defines the methods that the Telemetry struct must implement.
type Telemetry ¶
type Telemetry struct {
// contains filtered or unexported fields
}
func (*Telemetry) CreateRootSpan ¶
CreateRootSpan creates a new root span and stores it internally.
func (*Telemetry) EndSpan ¶
EndSpan ends the given span and removes the latest context from the stack.