File tree Expand file tree Collapse file tree 3 files changed +5
-36
lines changed
Expand file tree Collapse file tree 3 files changed +5
-36
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import (
3030 "kubeops.dev/pgoutbox/internal/telemetry"
3131
3232 "github.com/urfave/cli/v2"
33+ "kubeops.dev/pgoutbox/internal/telemetry/metrics"
3334 "kubeops.dev/pgoutbox/internal/util"
3435)
3536
@@ -110,7 +111,7 @@ func main() {
110111 }
111112 }()
112113
113- metrics , err := apis . NewMetrics ()
114+ metrics , err := metrics . New ()
114115 if err != nil {
115116 return fmt .Errorf ("initialize metrics: %w" , err )
116117 }
Original file line number Diff line number Diff line change 1- /*
2- Copyright AppsCode Inc. and Contributors
3-
4- Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
6- You may obtain a copy of the License at
7-
8- http://www.apache.org/licenses/LICENSE-2.0
9-
10- Unless required by applicable law or agreed to in writing, software
11- distributed under the License is distributed on an "AS IS" BASIS,
12- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- See the License for the specific language governing permissions and
14- limitations under the License.
15- */
16-
17- package apis
1+ package metrics
182
193import (
204 "context"
@@ -46,7 +30,7 @@ type Metrics struct {
4630 currentLSN metric.Int64Gauge
4731}
4832
49- func NewMetrics () (* Metrics , error ) {
33+ func New () (* Metrics , error ) {
5034 meter := otel .Meter (meterName )
5135
5236 eventsPublished , err := meter .Int64Counter (
Original file line number Diff line number Diff line change 1- /*
2- Copyright AppsCode Inc. and Contributors
3-
4- Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
6- You may obtain a copy of the License at
7-
8- http://www.apache.org/licenses/LICENSE-2.0
9-
10- Unless required by applicable law or agreed to in writing, software
11- distributed under the License is distributed on an "AS IS" BASIS,
12- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- See the License for the specific language governing permissions and
14- limitations under the License.
15- */
16-
171package telemetry
182
193import (
@@ -24,7 +8,7 @@ import (
248 "go.opentelemetry.io/otel/exporters/prometheus"
259 "go.opentelemetry.io/otel/sdk/metric"
2610 "go.opentelemetry.io/otel/sdk/resource"
27- semconv "go.opentelemetry.io/otel/semconv/v1.26 .0"
11+ semconv "go.opentelemetry.io/otel/semconv/v1.17 .0"
2812)
2913
3014var meterProvider * metric.MeterProvider
You can’t perform that action at this time.
0 commit comments