userver: userver/utils/statistics/portability_info.hpp File Reference
Loading...
Searching...
No Matches
portability_info.hpp File Reference

Detailed Description

Portability reports.

Definition in file portability_info.hpp.

Go to the source code of this file.

#include <string>
#include <userver/utils/statistics/storage.hpp>
+ Include dependency graph for portability_info.hpp:

Classes

struct  utils::statistics::Warning
 

Namespaces

namespace  utils
 Utilities.
 

Typedefs

using utils::statistics::PortabilityWarnings
 

Enumerations

enum class  WarningCode {
  kInf ,
  kNan ,
  kHistogramBucketsCount ,
  kLabelsCount ,
  kReservedLabelApplication ,
  kReservedLabelCluster ,
  kReservedLabelGroup ,
  kReservedLabelHost ,
  kReservedLabelProject ,
  kReservedLabelSensor ,
  kReservedLabelService ,
  kLabelNameLength ,
  kLabelValueLength ,
  kPathLength ,
  kLabelNameMismatch
}
 

Functions

formats::json::Value utils::statistics::Serialize (const std::vector< Label > &labels, formats::serialize::To< formats::json::Value >)
 
formats::json::Value utils::statistics::Serialize (const Warning &entry, formats::serialize::To< formats::json::Value >)
 
std::string_view utils::statistics::ToString (WarningCode code)
 
formats::json::Value utils::statistics::Serialize (const PortabilityWarnings &info, formats::serialize::To< formats::json::Value >)
 
PortabilityWarnings utils::statistics::GetPortabilityWarnings (const utils::statistics::Storage &statistics, const utils::statistics::Request &request)
 

Typedef Documentation

◆ PortabilityWarnings

using utils::statistics::PortabilityWarnings
Initial value:
std::unordered_map<WarningCode, std::vector<Warning>>

Definition at line 49 of file portability_info.hpp.

Enumeration Type Documentation

◆ WarningCode

enum class utils::statistics::WarningCode
strong

Definition at line 26 of file portability_info.hpp.

Function Documentation

◆ GetPortabilityWarnings()

PortabilityWarnings utils::statistics::GetPortabilityWarnings ( const utils::statistics::Storage & statistics,
const utils::statistics::Request & request )

Output portability info for statistics.

See also
Functional service tests (testsuite)

◆ Serialize()

formats::json::Value utils::statistics::Serialize ( const PortabilityWarnings & info,
formats::serialize::To< formats::json::Value >  )

JSON serilization for the PortabilityInfo in the following format:

{
"warning_code": [
{
"error_message": "Human readable message",
"path": "foo-bar",
"labels": {
"some-label": "label-value",
"some-other-label": "other-label-value",
}
}
],
"another_error_id": [
{
"path": "foo.bar",
"labels": {
"another-label": "another-value"
}
},
]
}