File: methods.go

package info (click to toggle)
golang-opentelemetry-contrib 0.56.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,884 kB
  • sloc: makefile: 278; sh: 211; sed: 1
file content (59 lines) | stat: -rw-r--r-- 1,615 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures.
package main

import (
	__atel_context "context"
	__atel_otel "go.opentelemetry.io/otel"
)

type element struct {
}

type driver struct {
	e element
}

type i interface {
	anotherfoo(__atel_tracing_ctx __atel_context.Context, p int) int
}

type impl struct {
}

func (i impl) anotherfoo(__atel_tracing_ctx __atel_context.Context, p int) int {
	__atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("anotherfoo").Start(__atel_tracing_ctx, "anotherfoo")
	_ = __atel_child_tracing_ctx
	defer __atel_span.End()
	return 5
}

func anotherfoo(p int) int {
	return 1
}

func (d driver) process(__atel_tracing_ctx __atel_context.Context, a int) {
	__atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("process").Start(__atel_tracing_ctx, "process")
	_ = __atel_child_tracing_ctx
	defer __atel_span.End()
}

func (e element) get(__atel_tracing_ctx __atel_context.Context, a int) {
	__atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("get").Start(__atel_tracing_ctx, "get")
	_ = __atel_child_tracing_ctx
	defer __atel_span.End()
}

func methods(__atel_tracing_ctx __atel_context.Context,) {
	__atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("methods").Start(__atel_tracing_ctx, "methods")
	_ = __atel_child_tracing_ctx
	defer __atel_span.End()
	d := driver{}
	d.process(__atel_child_tracing_ctx, 10)
	d.e.get(__atel_child_tracing_ctx, 5)
	var in i
	in = impl{}
	in.anotherfoo(__atel_child_tracing_ctx, 10)
}