stacktraces

package
v0.0.0-...-3bf0021 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 27 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ERROR_CONTEXT_LINES = 5
View Source
const ERROR_CONTEXT_MAX_LENGTH = 1000
View Source
const ERROR_STACK_MAX_FIELD_SIZE = 1000
View Source
const ERROR_STACK_MAX_FRAME_COUNT = 64
View Source
const SOURCE_MAP_MAX_FILE_SIZE = 128e6

Variables

View Source
var NextNodeServerlessRegex = regexp.MustCompile(`/var/task(/.*)?/(\.next|node_modules)/(.+)`)
View Source
var OSSNPMMapper = map[string]string{
	"@commerce-apps/core": "https://unpkg.com/@commerce-apps/core@1.7.0",
}
View Source
var OSSSourceMapper = map[string]string{
	"@commerce-apps/core": "https://raw.githubusercontent.com/SalesforceCommerceCloud/commerce-sdk-core/refs/heads/main",
}

Functions

func EnhanceStackTrace

func EnhanceStackTrace(ctx context.Context, input []*publicModel.StackFrameInput, projectId int, version *string, storageClient storage.Client) ([]*privateModel.ErrorTrace, error)

* EnhanceStackTrace makes no DB changes * It loops through the stack trace, for each : * fetches the sourcemap from remote * maps the error info into slice

func FormatStructureStackTrace

func FormatStructureStackTrace(ctx context.Context, stackTrace string, opts ...StructureStackTraceOption) string

func StructureOTELStackTrace

func StructureOTELStackTrace(stackTrace string, opts ...StructureStackTraceOption) ([]*publicModel.ErrorTrace, error)

StructureOTELStackTrace processes a backend opentelemetry stacktrace into a structured ErrorTraces. The operation returns the deepest frame first (reversing the order of the incoming stacktrace).

Types

type DiskFetcher

type DiskFetcher struct{}

type Language

type Language string
const DotNET Language = "dotnet"
const Golang Language = "golang"
const Javascript Language = "js"
const JavascriptOTeL Language = "js-otel"
const Python Language = "python"
const Ruby Language = "ruby"

type NetworkFetcher

type NetworkFetcher struct {
	// contains filtered or unexported fields
}

type StructureStackTraceConfig

type StructureStackTraceConfig struct {
	FromOTeL bool
}

type StructureStackTraceOption

type StructureStackTraceOption func(cfg *StructureStackTraceConfig)

func FromOTeL

func FromOTeL() StructureStackTraceOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL