Documentation ¶
Overview ¶
Package json allows converting model.Trace to external JSON data model.
Index ¶
- func DependenciesFromDomain(dependencyLinks []model.DependencyLink) []json.DependencyLink
- func FromDomain(trace *model.Trace) *json.Trace
- func FromDomainEmbedProcess(span *model.Span) *json.Span
- func SamplingStrategyResponseFromJSON(json []byte) (*api_v2.SamplingStrategyResponse, error)
- func SamplingStrategyResponseToJSON(protoObj *api_v2.SamplingStrategyResponse) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DependenciesFromDomain ¶
func DependenciesFromDomain(dependencyLinks []model.DependencyLink) []json.DependencyLink
DependenciesFromDomain converts []model.DependencyLink into []json.DependencyLink format.
func FromDomain ¶
FromDomain converts model.Trace into json.Trace format. It assumes that the domain model is valid, namely that all enums have valid values, so that it does not need to check for errors.
func FromDomainEmbedProcess ¶
FromDomainEmbedProcess converts model.Span into json.Span format. This format includes a ParentSpanID and an embedded Process.
func SamplingStrategyResponseFromJSON ¶ added in v1.42.0
func SamplingStrategyResponseFromJSON(json []byte) (*api_v2.SamplingStrategyResponse, error)
SamplingStrategyResponseFromJSON is the official way to parse strategy in JSON.
func SamplingStrategyResponseToJSON ¶ added in v1.42.0
func SamplingStrategyResponseToJSON(protoObj *api_v2.SamplingStrategyResponse) (string, error)
SamplingStrategyResponseToJSON defines the official way to generate a JSON response from /sampling endpoints.
Types ¶
This section is empty.