Skip to content

Commit

Permalink
generate the profiling pdata
Browse files Browse the repository at this point in the history
  • Loading branch information
dmathieu committed May 21, 2024
1 parent b1579a5 commit daa6f5b
Show file tree
Hide file tree
Showing 58 changed files with 7,050 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pdata/internal/cmd/pdatagen/internal/packages.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions pdata/internal/cmd/pdatagen/internal/pprofile_otlp_package.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package internal // import "go.opentelemetry.io/collector/pdata/internal/cmd/pdatagen/internal"
import (
"path/filepath"
)

var pprofileotlp = &Package{
name: "pprofileotlp",
path: filepath.Join("pprofile", "pprofileotlp"),
imports: []string{
`otlpcollectorprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental"`,
},
testImports: []string{
`"testing"`,
``,
`"github.com/stretchr/testify/assert"`,
},
structs: []baseStruct{
exportProfilesPartialSuccess,
},
}

var exportProfilesPartialSuccess = &messageValueStruct{
structName: "ExportPartialSuccess",
description: "// ExportPartialSuccess represents the details of a partially successful export request.",
originFullName: "otlpcollectorprofile.ExportProfilesPartialSuccess",
fields: []baseField{
&primitiveField{
fieldName: "RejectedProfiles",
returnType: "int64",
defaultVal: `int64(0)`,
testVal: `int64(13)`,
},
&primitiveField{
fieldName: "ErrorMessage",
returnType: "string",
defaultVal: `""`,
testVal: `"error message"`,
},
},
}
Loading

0 comments on commit daa6f5b

Please sign in to comment.