1 # Copyright (c) 2022 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
14 """Constants used in telemetry.
16 "Constant" means a value that keeps its value since initialization. The value
17 does not need to be hard coded here, but can be read from environment variables.
22 """Constants used in telemetry.
23 1-10: Telemetry errors
24 11-50: VPP bundle error
25 51-100: Linux bundle errors"""
27 # Failed when processing data
28 err_telemetry_process = 1
30 # Failed to read YAML file
31 err_telemetry_yaml = 2
33 # Error executing bundle
34 err_telemetry_bundle = 3
36 # Could not connect to VPP
39 # Could not disconnect from VPP
40 err_vpp_disconnect = 12
42 # Failed when executing command
45 # Could not attach BPF events
48 # Could not detach BPF events
51 # Could not successfuly run perf stat command
52 err_linux_perf_stat = 53