# Copyright The OpenTelemetry Authors
#
# 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.

from typing import Final

PPROF_LOCATION_IS_FOLDED: Final = "pprof.location.is_folded"
"""
Provides an indication that multiple symbols map to this location's address, for example due to identical code folding by the linker. In that case the line information represents one of the multiple symbols. This field must be recomputed when the symbolization state of the profile changes.
"""

PPROF_MAPPING_HAS_FILENAMES: Final = "pprof.mapping.has_filenames"
"""
Indicates that there are filenames related to this mapping.
"""

PPROF_MAPPING_HAS_FUNCTIONS: Final = "pprof.mapping.has_functions"
"""
Indicates that there are functions related to this mapping.
"""

PPROF_MAPPING_HAS_INLINE_FRAMES: Final = "pprof.mapping.has_inline_frames"
"""
Indicates that there are inline frames related to this mapping.
"""

PPROF_MAPPING_HAS_LINE_NUMBERS: Final = "pprof.mapping.has_line_numbers"
"""
Indicates that there are line numbers related to this mapping.
"""

PPROF_PROFILE_COMMENT: Final = "pprof.profile.comment"
"""
Free-form text associated with the profile. This field should not be used to store any machine-readable information, it is only for human-friendly content.
"""

PPROF_PROFILE_DOC_URL: Final = "pprof.profile.doc_url"
"""
Documentation link for this profile type.
Note: The URL must be absolute and may be missing if the profile was generated by code that did not supply a link.
"""

PPROF_PROFILE_DROP_FRAMES: Final = "pprof.profile.drop_frames"
"""
Frames with Function.function_name fully matching the regexp will be dropped from the samples, along with their successors.
"""

PPROF_PROFILE_KEEP_FRAMES: Final = "pprof.profile.keep_frames"
"""
Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames.
"""

PPROF_SCOPE_DEFAULT_SAMPLE_TYPE: Final = "pprof.scope.default_sample_type"
"""
Records the pprof's default_sample_type in the original profile. Not set if the default sample type was missing.
Note: This attribute, if present, MUST be set at the scope level (resource_profiles[].scope_profiles[].scope.attributes[]).
"""

PPROF_SCOPE_SAMPLE_TYPE_ORDER: Final = "pprof.scope.sample_type_order"
"""
Records the indexes of the sample types in the original profile.
Note: This attribute, if present, MUST be set at the scope level (resource_profiles[].scope_profiles[].scope.attributes[]).
"""
