Documentation
¶
Index ¶
Constants ¶
View Source
const ( // vcs.repository.name AttributeVCSRepositoryName = "vcs.repository.name" // vcs.ref.head.name (used in trace generation) AttributeVCSRefHead = "vcs.ref.head" // vcs.ref.head.revision AttributeVCSRefHeadRevision = "vcs.ref.head.revision" // vcs.ref.head.type with enum values of branch or tag. // Note: This is now standardized in semantic conventions v1.37.0 AttributeVCSRefHeadType = "vcs.ref.head.type" AttributeVCSRefHeadTypeBranch = "branch" AttributeVCSRefHeadTypeTag = "tag" AttributeCICDPipelineRunURLFull = "cicd.pipeline.run.url.full" // equivalent to GitHub's `html_url` // CICD pipeline and task run status attributes for GitHub workflow integration AttributeCICDPipelineRunStatus = "cicd.pipeline.run.status" // equivalent to GitHub's `conclusion` AttributeCICDPipelineRunStatusSuccess = "success" AttributeCICDPipelineRunStatusFailure = "failure" AttributeCICDPipelineRunStatusCancellation = "cancellation" AttributeCICDPipelineRunStatusSkip = "skip" AttributeCICDPipelineTaskRunStatus = "cicd.pipeline.run.task.status" // equivalent to GitHub's `conclusion` AttributeCICDPipelineTaskRunStatusSuccess = "success" AttributeCICDPipelineTaskRunStatusFailure = "failure" AttributeCICDPipelineTaskRunStatusCancellation = "cancellation" AttributeCICDPipelineTaskRunStatusSkip = "skip" // The following GitHub-specific attributes are not part of semantic conventions v1.37.0. AttributeCICDPipelineRunSenderLogin = "cicd.pipeline.run.sender.login" // GitHub's Run Sender Login AttributeCICDPipelineTaskRunSenderLogin = "cicd.pipeline.task.run.sender.login" // GitHub's Task Sender Login AttributeCICDPipelinePreviousAttemptURLFull = "cicd.pipeline.run.previous_attempt.url.full" AttributeCICDPipelineWorkerID = "cicd.pipeline.worker.id" // GitHub's Runner ID AttributeCICDPipelineWorkerGroupID = "cicd.pipeline.worker.group.id" // GitHub's Runner Group ID AttributeCICDPipelineWorkerName = "cicd.pipeline.worker.name" // GitHub's Runner Name AttributeCICDPipelineWorkerGroupName = "cicd.pipeline.worker.group.name" // GitHub's Runner Group Name AttributeCICDPipelineWorkerNodeID = "cicd.pipeline.worker.node.id" // GitHub's Runner Node ID AttributeCICDPipelineWorkerLabels = "cicd.pipeline.worker.labels" // GitHub's Runner Labels AttributeCICDPipelineRunQueueDuration = "cicd.pipeline.run.queue.duration" // GitHub's Queue Duration // The following attributes are exclusive to GitHub but not listed under // vendor extensions within semantic conventions v1.37.0. AttributeGitHubRepositoryCustomProperty = "github.repository.custom_properties" // GitHub's Repository Custom Properties (used in custom property processing) // github.reference.workflow acts as a template attribute where it'll be // joined with a `name` and a `version` value. There is an unknown amount of // reference workflows that are sent as a list of strings by GitHub making // it necessary to leverage template attributes. One key thing to note is // the length of the names. Evaluate if this causes issues. // WARNING: Extremely long workflow file names could create extremely long // attribute keys which could lead to unknown issues in the backend and // create additional memory usage overhead when processing data (though // unlikely). // TODO: Evaluate if there is a need to truncate long workflow files names. // eg. github.reference.workflow.my-great-workflow.path // eg. github.reference.workflow.my-great-workflow.version // eg. github.reference.workflow.my-great-workflow.revision AttributeGitHubReferenceWorkflow = "github.reference.workflow" // SECURITY: This information will always exist on the repository, but may // be considered private if the repository is set to private. Care should be // taken in the data pipeline for sanitizing sensitive user information if // the user deems it as such. AttributeVCSRefHeadRevisionAuthorName = "vcs.ref.head.revision.author.name" // GitHub's Head Revision Author Name AttributeVCSRefHeadRevisionAuthorEmail = "vcs.ref.head.revision.author.email" // GitHub's Head Revision Author Email )
model.go contains custom attributes that complement the standardized attributes from OpenTelemetry semantic conventions v1.37.0. While many VCS and CICD attributes are now standardized, these custom attributes provide GitHub-specific functionality not yet covered by the standard semantic conventions.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
NewFactory creates a factory for the github receiver
Types ¶
type Config ¶
type Config struct {
scraperhelper.ControllerConfig `mapstructure:",squash"`
Scrapers map[string]internal.Config `mapstructure:"scrapers"`
metadata.MetricsBuilderConfig `mapstructure:",squash"`
WebHook WebHook `mapstructure:"webhook"`
}
Config that is exposed to this github receiver through the OTEL config.yaml
type GitHubHeaders ¶ added in v0.120.0
type WebHook ¶ added in v0.116.0
type WebHook struct {
confighttp.ServerConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
Path string `mapstructure:"path"` // path for data collection. Default is /events
HealthPath string `mapstructure:"health_path"` // path for health check api. Default is /health_check
RequiredHeaders map[string]configopaque.String `mapstructure:"required_headers"` // optional setting to set one or more required headers for all requests to have (except the health check)
GitHubHeaders GitHubHeaders `mapstructure:",squash"` // GitLab headers set by default
Secret string `mapstructure:"secret"` // secret for webhook
ServiceName string `mapstructure:"service_name"`
IncludeSpanEvents bool `mapstructure:"include_span_events"` // attach raw webhook event JSON as span events
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.