package vcsconv
import "go.opentelemetry.io/otel/semconv/v1.32.0/vcsconv"
Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "vcs" namespace.
Index ¶
- type ChangeCount
- func NewChangeCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (ChangeCount, error)
- func (m ChangeCount) Add( ctx context.Context, incr int64, changeState ChangeStateAttr, repositoryUrlFull string, attrs ...attribute.KeyValue, )
- func (ChangeCount) AttrOwnerName(val string) attribute.KeyValue
- func (ChangeCount) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (ChangeCount) AttrRepositoryName(val string) attribute.KeyValue
- func (ChangeCount) Description() string
- func (m ChangeCount) Inst() metric.Int64UpDownCounter
- func (ChangeCount) Name() string
- func (ChangeCount) Unit() string
- type ChangeDuration
- func NewChangeDuration( m metric.Meter, opt ...metric.Float64GaugeOption, ) (ChangeDuration, error)
- func (ChangeDuration) AttrOwnerName(val string) attribute.KeyValue
- func (ChangeDuration) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (ChangeDuration) AttrRepositoryName(val string) attribute.KeyValue
- func (ChangeDuration) Description() string
- func (m ChangeDuration) Inst() metric.Float64Gauge
- func (ChangeDuration) Name() string
- func (m ChangeDuration) Record( ctx context.Context, val float64, changeState ChangeStateAttr, refHeadName string, repositoryUrlFull string, attrs ...attribute.KeyValue, )
- func (ChangeDuration) Unit() string
- type ChangeStateAttr
- type ChangeTimeToApproval
- func NewChangeTimeToApproval( m metric.Meter, opt ...metric.Float64GaugeOption, ) (ChangeTimeToApproval, error)
- func (ChangeTimeToApproval) AttrOwnerName(val string) attribute.KeyValue
- func (ChangeTimeToApproval) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (ChangeTimeToApproval) AttrRefBaseName(val string) attribute.KeyValue
- func (ChangeTimeToApproval) AttrRefBaseRevision(val string) attribute.KeyValue
- func (ChangeTimeToApproval) AttrRefHeadRevision(val string) attribute.KeyValue
- func (ChangeTimeToApproval) AttrRepositoryName(val string) attribute.KeyValue
- func (ChangeTimeToApproval) Description() string
- func (m ChangeTimeToApproval) Inst() metric.Float64Gauge
- func (ChangeTimeToApproval) Name() string
- func (m ChangeTimeToApproval) Record( ctx context.Context, val float64, refHeadName string, repositoryUrlFull string, attrs ...attribute.KeyValue, )
- func (ChangeTimeToApproval) Unit() string
- type ChangeTimeToMerge
- func NewChangeTimeToMerge( m metric.Meter, opt ...metric.Float64GaugeOption, ) (ChangeTimeToMerge, error)
- func (ChangeTimeToMerge) AttrOwnerName(val string) attribute.KeyValue
- func (ChangeTimeToMerge) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (ChangeTimeToMerge) AttrRefBaseName(val string) attribute.KeyValue
- func (ChangeTimeToMerge) AttrRefBaseRevision(val string) attribute.KeyValue
- func (ChangeTimeToMerge) AttrRefHeadRevision(val string) attribute.KeyValue
- func (ChangeTimeToMerge) AttrRepositoryName(val string) attribute.KeyValue
- func (ChangeTimeToMerge) Description() string
- func (m ChangeTimeToMerge) Inst() metric.Float64Gauge
- func (ChangeTimeToMerge) Name() string
- func (m ChangeTimeToMerge) Record( ctx context.Context, val float64, refHeadName string, repositoryUrlFull string, attrs ...attribute.KeyValue, )
- func (ChangeTimeToMerge) Unit() string
- type ContributorCount
- func NewContributorCount( m metric.Meter, opt ...metric.Int64GaugeOption, ) (ContributorCount, error)
- func (ContributorCount) AttrOwnerName(val string) attribute.KeyValue
- func (ContributorCount) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (ContributorCount) AttrRepositoryName(val string) attribute.KeyValue
- func (ContributorCount) Description() string
- func (m ContributorCount) Inst() metric.Int64Gauge
- func (ContributorCount) Name() string
- func (m ContributorCount) Record( ctx context.Context, val int64, repositoryUrlFull string, attrs ...attribute.KeyValue, )
- func (ContributorCount) Unit() string
- type LineChangeTypeAttr
- type ProviderNameAttr
- type RefBaseTypeAttr
- type RefCount
- func NewRefCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (RefCount, error)
- func (m RefCount) Add( ctx context.Context, incr int64, refType RefTypeAttr, repositoryUrlFull string, attrs ...attribute.KeyValue, )
- func (RefCount) AttrOwnerName(val string) attribute.KeyValue
- func (RefCount) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (RefCount) AttrRepositoryName(val string) attribute.KeyValue
- func (RefCount) Description() string
- func (m RefCount) Inst() metric.Int64UpDownCounter
- func (RefCount) Name() string
- func (RefCount) Unit() string
- type RefHeadTypeAttr
- type RefLinesDelta
- func NewRefLinesDelta( m metric.Meter, opt ...metric.Int64GaugeOption, ) (RefLinesDelta, error)
- func (RefLinesDelta) AttrChangeID(val string) attribute.KeyValue
- func (RefLinesDelta) AttrOwnerName(val string) attribute.KeyValue
- func (RefLinesDelta) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (RefLinesDelta) AttrRepositoryName(val string) attribute.KeyValue
- func (RefLinesDelta) Description() string
- func (m RefLinesDelta) Inst() metric.Int64Gauge
- func (RefLinesDelta) Name() string
- func (m RefLinesDelta) Record( ctx context.Context, val int64, lineChangeType LineChangeTypeAttr, refBaseName string, refBaseType RefBaseTypeAttr, refHeadName string, refHeadType RefHeadTypeAttr, repositoryUrlFull string, attrs ...attribute.KeyValue, )
- func (RefLinesDelta) Unit() string
- type RefRevisionsDelta
- func NewRefRevisionsDelta( m metric.Meter, opt ...metric.Int64GaugeOption, ) (RefRevisionsDelta, error)
- func (RefRevisionsDelta) AttrChangeID(val string) attribute.KeyValue
- func (RefRevisionsDelta) AttrOwnerName(val string) attribute.KeyValue
- func (RefRevisionsDelta) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (RefRevisionsDelta) AttrRepositoryName(val string) attribute.KeyValue
- func (RefRevisionsDelta) Description() string
- func (m RefRevisionsDelta) Inst() metric.Int64Gauge
- func (RefRevisionsDelta) Name() string
- func (m RefRevisionsDelta) Record( ctx context.Context, val int64, refBaseName string, refBaseType RefBaseTypeAttr, refHeadName string, refHeadType RefHeadTypeAttr, repositoryUrlFull string, revisionDeltaDirection RevisionDeltaDirectionAttr, attrs ...attribute.KeyValue, )
- func (RefRevisionsDelta) Unit() string
- type RefTime
- func NewRefTime( m metric.Meter, opt ...metric.Float64GaugeOption, ) (RefTime, error)
- func (RefTime) AttrOwnerName(val string) attribute.KeyValue
- func (RefTime) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (RefTime) AttrRepositoryName(val string) attribute.KeyValue
- func (RefTime) Description() string
- func (m RefTime) Inst() metric.Float64Gauge
- func (RefTime) Name() string
- func (m RefTime) Record( ctx context.Context, val float64, refHeadName string, refHeadType RefHeadTypeAttr, repositoryUrlFull string, attrs ...attribute.KeyValue, )
- func (RefTime) Unit() string
- type RefTypeAttr
- type RepositoryCount
- func NewRepositoryCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (RepositoryCount, error)
- func (m RepositoryCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (RepositoryCount) AttrOwnerName(val string) attribute.KeyValue
- func (RepositoryCount) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
- func (RepositoryCount) Description() string
- func (m RepositoryCount) Inst() metric.Int64UpDownCounter
- func (RepositoryCount) Name() string
- func (RepositoryCount) Unit() string
- type RevisionDeltaDirectionAttr
Types ¶
type ChangeCount ¶
type ChangeCount struct { metric.Int64UpDownCounter }
ChangeCount is an instrument used to record metric values conforming to the "vcs.change.count" semantic conventions. It represents the number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged).
func NewChangeCount ¶
func NewChangeCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (ChangeCount, error)
NewChangeCount returns a new ChangeCount instrument.
func (ChangeCount) Add ¶
func (m ChangeCount) Add( ctx context.Context, incr int64, changeState ChangeStateAttr, repositoryUrlFull string, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
The changeState is the the state of the change (pull request/merge request/changelist).
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
All additional attrs passed are included in the recorded value.
func (ChangeCount) AttrOwnerName ¶
func (ChangeCount) AttrOwnerName(val string) attribute.KeyValue
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (ChangeCount) AttrProviderName ¶
func (ChangeCount) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (ChangeCount) AttrRepositoryName ¶
func (ChangeCount) AttrRepositoryName(val string) attribute.KeyValue
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (ChangeCount) Description ¶
func (ChangeCount) Description() string
Description returns the semantic convention description of the instrument
func (ChangeCount) Inst ¶
func (m ChangeCount) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ChangeCount) Name ¶
func (ChangeCount) Name() string
Name returns the semantic convention name of the instrument.
func (ChangeCount) Unit ¶
func (ChangeCount) Unit() string
Unit returns the semantic convention unit of the instrument
type ChangeDuration ¶
type ChangeDuration struct { metric.Float64Gauge }
ChangeDuration is an instrument used to record metric values conforming to the "vcs.change.duration" semantic conventions. It represents the time duration a change (pull request/merge request/changelist) has been in a given state.
func NewChangeDuration ¶
func NewChangeDuration( m metric.Meter, opt ...metric.Float64GaugeOption, ) (ChangeDuration, error)
NewChangeDuration returns a new ChangeDuration instrument.
func (ChangeDuration) AttrOwnerName ¶
func (ChangeDuration) AttrOwnerName(val string) attribute.KeyValue
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (ChangeDuration) AttrProviderName ¶
func (ChangeDuration) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (ChangeDuration) AttrRepositoryName ¶
func (ChangeDuration) AttrRepositoryName(val string) attribute.KeyValue
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (ChangeDuration) Description ¶
func (ChangeDuration) Description() string
Description returns the semantic convention description of the instrument
func (ChangeDuration) Inst ¶
func (m ChangeDuration) Inst() metric.Float64Gauge
Inst returns the underlying metric instrument.
func (ChangeDuration) Name ¶
func (ChangeDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ChangeDuration) Record ¶
func (m ChangeDuration) Record( ctx context.Context, val float64, changeState ChangeStateAttr, refHeadName string, repositoryUrlFull string, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
The changeState is the the state of the change (pull request/merge request/changelist).
The refHeadName is the the name of the reference such as **branch** or **tag** in the repository.
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
All additional attrs passed are included in the recorded value.
func (ChangeDuration) Unit ¶
func (ChangeDuration) Unit() string
Unit returns the semantic convention unit of the instrument
type ChangeStateAttr ¶
type ChangeStateAttr string
ChangeStateAttr is an attribute conforming to the vcs.change.state semantic conventions. It represents the state of the change (pull request/merge request/changelist).
var ( // ChangeStateOpen is the open means the change is currently active and under // review. It hasn't been merged into the target branch yet, and it's still // possible to make changes or add comments. ChangeStateOpen ChangeStateAttr = "open" // ChangeStateWip is the WIP (work-in-progress, draft) means the change is still // in progress and not yet ready for a full review. It might still undergo // significant changes. ChangeStateWip ChangeStateAttr = "wip" // ChangeStateClosed is the closed means the merge request has been closed // without merging. This can happen for various reasons, such as the changes // being deemed unnecessary, the issue being resolved in another way, or the // author deciding to withdraw the request. ChangeStateClosed ChangeStateAttr = "closed" // ChangeStateMerged is the merged indicates that the change has been // successfully integrated into the target codebase. ChangeStateMerged ChangeStateAttr = "merged" )
type ChangeTimeToApproval ¶
type ChangeTimeToApproval struct { metric.Float64Gauge }
ChangeTimeToApproval is an instrument used to record metric values conforming to the "vcs.change.time_to_approval" semantic conventions. It represents the amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval.
func NewChangeTimeToApproval ¶
func NewChangeTimeToApproval( m metric.Meter, opt ...metric.Float64GaugeOption, ) (ChangeTimeToApproval, error)
NewChangeTimeToApproval returns a new ChangeTimeToApproval instrument.
func (ChangeTimeToApproval) AttrOwnerName ¶
func (ChangeTimeToApproval) AttrOwnerName(val string) attribute.KeyValue
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (ChangeTimeToApproval) AttrProviderName ¶
func (ChangeTimeToApproval) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (ChangeTimeToApproval) AttrRefBaseName ¶
func (ChangeTimeToApproval) AttrRefBaseName(val string) attribute.KeyValue
AttrRefBaseName returns an optional attribute for the "vcs.ref.base.name" semantic convention. It represents the name of the reference such as **branch** or **tag** in the repository.
func (ChangeTimeToApproval) AttrRefBaseRevision ¶
func (ChangeTimeToApproval) AttrRefBaseRevision(val string) attribute.KeyValue
AttrRefBaseRevision returns an optional attribute for the "vcs.ref.base.revision" semantic convention. It represents the revision, literally revised version, The revision most often refers to a commit object in Git, or a revision number in SVN.
func (ChangeTimeToApproval) AttrRefHeadRevision ¶
func (ChangeTimeToApproval) AttrRefHeadRevision(val string) attribute.KeyValue
AttrRefHeadRevision returns an optional attribute for the "vcs.ref.head.revision" semantic convention. It represents the revision, literally revised version, The revision most often refers to a commit object in Git, or a revision number in SVN.
func (ChangeTimeToApproval) AttrRepositoryName ¶
func (ChangeTimeToApproval) AttrRepositoryName(val string) attribute.KeyValue
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (ChangeTimeToApproval) Description ¶
func (ChangeTimeToApproval) Description() string
Description returns the semantic convention description of the instrument
func (ChangeTimeToApproval) Inst ¶
func (m ChangeTimeToApproval) Inst() metric.Float64Gauge
Inst returns the underlying metric instrument.
func (ChangeTimeToApproval) Name ¶
func (ChangeTimeToApproval) Name() string
Name returns the semantic convention name of the instrument.
func (ChangeTimeToApproval) Record ¶
func (m ChangeTimeToApproval) Record( ctx context.Context, val float64, refHeadName string, repositoryUrlFull string, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
The refHeadName is the the name of the reference such as **branch** or **tag** in the repository.
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
All additional attrs passed are included in the recorded value.
func (ChangeTimeToApproval) Unit ¶
func (ChangeTimeToApproval) Unit() string
Unit returns the semantic convention unit of the instrument
type ChangeTimeToMerge ¶
type ChangeTimeToMerge struct { metric.Float64Gauge }
ChangeTimeToMerge is an instrument used to record metric values conforming to the "vcs.change.time_to_merge" semantic conventions. It represents the amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref.
func NewChangeTimeToMerge ¶
func NewChangeTimeToMerge( m metric.Meter, opt ...metric.Float64GaugeOption, ) (ChangeTimeToMerge, error)
NewChangeTimeToMerge returns a new ChangeTimeToMerge instrument.
func (ChangeTimeToMerge) AttrOwnerName ¶
func (ChangeTimeToMerge) AttrOwnerName(val string) attribute.KeyValue
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (ChangeTimeToMerge) AttrProviderName ¶
func (ChangeTimeToMerge) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (ChangeTimeToMerge) AttrRefBaseName ¶
func (ChangeTimeToMerge) AttrRefBaseName(val string) attribute.KeyValue
AttrRefBaseName returns an optional attribute for the "vcs.ref.base.name" semantic convention. It represents the name of the reference such as **branch** or **tag** in the repository.
func (ChangeTimeToMerge) AttrRefBaseRevision ¶
func (ChangeTimeToMerge) AttrRefBaseRevision(val string) attribute.KeyValue
AttrRefBaseRevision returns an optional attribute for the "vcs.ref.base.revision" semantic convention. It represents the revision, literally revised version, The revision most often refers to a commit object in Git, or a revision number in SVN.
func (ChangeTimeToMerge) AttrRefHeadRevision ¶
func (ChangeTimeToMerge) AttrRefHeadRevision(val string) attribute.KeyValue
AttrRefHeadRevision returns an optional attribute for the "vcs.ref.head.revision" semantic convention. It represents the revision, literally revised version, The revision most often refers to a commit object in Git, or a revision number in SVN.
func (ChangeTimeToMerge) AttrRepositoryName ¶
func (ChangeTimeToMerge) AttrRepositoryName(val string) attribute.KeyValue
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (ChangeTimeToMerge) Description ¶
func (ChangeTimeToMerge) Description() string
Description returns the semantic convention description of the instrument
func (ChangeTimeToMerge) Inst ¶
func (m ChangeTimeToMerge) Inst() metric.Float64Gauge
Inst returns the underlying metric instrument.
func (ChangeTimeToMerge) Name ¶
func (ChangeTimeToMerge) Name() string
Name returns the semantic convention name of the instrument.
func (ChangeTimeToMerge) Record ¶
func (m ChangeTimeToMerge) Record( ctx context.Context, val float64, refHeadName string, repositoryUrlFull string, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
The refHeadName is the the name of the reference such as **branch** or **tag** in the repository.
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
All additional attrs passed are included in the recorded value.
func (ChangeTimeToMerge) Unit ¶
func (ChangeTimeToMerge) Unit() string
Unit returns the semantic convention unit of the instrument
type ContributorCount ¶
type ContributorCount struct { metric.Int64Gauge }
ContributorCount is an instrument used to record metric values conforming to the "vcs.contributor.count" semantic conventions. It represents the number of unique contributors to a repository.
func NewContributorCount ¶
func NewContributorCount( m metric.Meter, opt ...metric.Int64GaugeOption, ) (ContributorCount, error)
NewContributorCount returns a new ContributorCount instrument.
func (ContributorCount) AttrOwnerName ¶
func (ContributorCount) AttrOwnerName(val string) attribute.KeyValue
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (ContributorCount) AttrProviderName ¶
func (ContributorCount) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (ContributorCount) AttrRepositoryName ¶
func (ContributorCount) AttrRepositoryName(val string) attribute.KeyValue
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (ContributorCount) Description ¶
func (ContributorCount) Description() string
Description returns the semantic convention description of the instrument
func (ContributorCount) Inst ¶
func (m ContributorCount) Inst() metric.Int64Gauge
Inst returns the underlying metric instrument.
func (ContributorCount) Name ¶
func (ContributorCount) Name() string
Name returns the semantic convention name of the instrument.
func (ContributorCount) Record ¶
func (m ContributorCount) Record( ctx context.Context, val int64, repositoryUrlFull string, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
All additional attrs passed are included in the recorded value.
func (ContributorCount) Unit ¶
func (ContributorCount) Unit() string
Unit returns the semantic convention unit of the instrument
type LineChangeTypeAttr ¶
type LineChangeTypeAttr string
LineChangeTypeAttr is an attribute conforming to the vcs.line_change.type semantic conventions. It represents the type of line change being measured on a branch or change.
var ( // LineChangeTypeAdded is the how many lines were added. LineChangeTypeAdded LineChangeTypeAttr = "added" // LineChangeTypeRemoved is the how many lines were removed. LineChangeTypeRemoved LineChangeTypeAttr = "removed" )
type ProviderNameAttr ¶
type ProviderNameAttr string
ProviderNameAttr is an attribute conforming to the vcs.provider.name semantic conventions. It represents the name of the version control system provider.
var ( // ProviderNameGithub is the [GitHub]. // // [GitHub]: https://github.com ProviderNameGithub ProviderNameAttr = "github" // ProviderNameGitlab is the [GitLab]. // // [GitLab]: https://gitlab.com ProviderNameGitlab ProviderNameAttr = "gitlab" // ProviderNameGittea is the [Gitea]. // // [Gitea]: https://gitea.io ProviderNameGittea ProviderNameAttr = "gittea" // ProviderNameBitbucket is the [Bitbucket]. // // [Bitbucket]: https://bitbucket.org ProviderNameBitbucket ProviderNameAttr = "bitbucket" )
type RefBaseTypeAttr ¶
type RefBaseTypeAttr string
RefBaseTypeAttr is an attribute conforming to the vcs.ref.base.type semantic conventions. It represents the type of the reference in the repository.
var ( // RefBaseTypeBranch is the [branch]. // // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch RefBaseTypeBranch RefBaseTypeAttr = "branch" // RefBaseTypeTag is the [tag]. // // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag RefBaseTypeTag RefBaseTypeAttr = "tag" )
type RefCount ¶
type RefCount struct { metric.Int64UpDownCounter }
RefCount is an instrument used to record metric values conforming to the "vcs.ref.count" semantic conventions. It represents the number of refs of type branch or tag in a repository.
func NewRefCount ¶
NewRefCount returns a new RefCount instrument.
func (RefCount) Add ¶
func (m RefCount) Add( ctx context.Context, incr int64, refType RefTypeAttr, repositoryUrlFull string, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
The refType is the the type of the reference in the repository.
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
All additional attrs passed are included in the recorded value.
func (RefCount) AttrOwnerName ¶
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (RefCount) AttrProviderName ¶
func (RefCount) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (RefCount) AttrRepositoryName ¶
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (RefCount) Description ¶
Description returns the semantic convention description of the instrument
func (RefCount) Inst ¶
func (m RefCount) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (RefCount) Name ¶
Name returns the semantic convention name of the instrument.
func (RefCount) Unit ¶
Unit returns the semantic convention unit of the instrument
type RefHeadTypeAttr ¶
type RefHeadTypeAttr string
RefHeadTypeAttr is an attribute conforming to the vcs.ref.head.type semantic conventions. It represents the type of the reference in the repository.
var ( // RefHeadTypeBranch is the [branch]. // // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch RefHeadTypeBranch RefHeadTypeAttr = "branch" // RefHeadTypeTag is the [tag]. // // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag RefHeadTypeTag RefHeadTypeAttr = "tag" )
type RefLinesDelta ¶
type RefLinesDelta struct { metric.Int64Gauge }
RefLinesDelta is an instrument used to record metric values conforming to the "vcs.ref.lines_delta" semantic conventions. It represents the number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute.
func NewRefLinesDelta ¶
func NewRefLinesDelta( m metric.Meter, opt ...metric.Int64GaugeOption, ) (RefLinesDelta, error)
NewRefLinesDelta returns a new RefLinesDelta instrument.
func (RefLinesDelta) AttrChangeID ¶
func (RefLinesDelta) AttrChangeID(val string) attribute.KeyValue
AttrChangeID returns an optional attribute for the "vcs.change.id" semantic convention. It represents the ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system.
func (RefLinesDelta) AttrOwnerName ¶
func (RefLinesDelta) AttrOwnerName(val string) attribute.KeyValue
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (RefLinesDelta) AttrProviderName ¶
func (RefLinesDelta) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (RefLinesDelta) AttrRepositoryName ¶
func (RefLinesDelta) AttrRepositoryName(val string) attribute.KeyValue
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (RefLinesDelta) Description ¶
func (RefLinesDelta) Description() string
Description returns the semantic convention description of the instrument
func (RefLinesDelta) Inst ¶
func (m RefLinesDelta) Inst() metric.Int64Gauge
Inst returns the underlying metric instrument.
func (RefLinesDelta) Name ¶
func (RefLinesDelta) Name() string
Name returns the semantic convention name of the instrument.
func (RefLinesDelta) Record ¶
func (m RefLinesDelta) Record( ctx context.Context, val int64, lineChangeType LineChangeTypeAttr, refBaseName string, refBaseType RefBaseTypeAttr, refHeadName string, refHeadType RefHeadTypeAttr, repositoryUrlFull string, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
The lineChangeType is the the type of line change being measured on a branch or change.
The refBaseName is the the name of the reference such as **branch** or **tag** in the repository.
The refBaseType is the the type of the reference in the repository.
The refHeadName is the the name of the reference such as **branch** or **tag** in the repository.
The refHeadType is the the type of the reference in the repository.
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
All additional attrs passed are included in the recorded value.
This metric should be reported for each `vcs.line_change.type` value. For example if a ref added 3 lines and removed 2 lines, instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers). If number of lines added/removed should be calculated from the start of time, then `vcs.ref.base.name` SHOULD be set to an empty string.
func (RefLinesDelta) Unit ¶
func (RefLinesDelta) Unit() string
Unit returns the semantic convention unit of the instrument
type RefRevisionsDelta ¶
type RefRevisionsDelta struct { metric.Int64Gauge }
RefRevisionsDelta is an instrument used to record metric values conforming to the "vcs.ref.revisions_delta" semantic conventions. It represents the number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute.
func NewRefRevisionsDelta ¶
func NewRefRevisionsDelta( m metric.Meter, opt ...metric.Int64GaugeOption, ) (RefRevisionsDelta, error)
NewRefRevisionsDelta returns a new RefRevisionsDelta instrument.
func (RefRevisionsDelta) AttrChangeID ¶
func (RefRevisionsDelta) AttrChangeID(val string) attribute.KeyValue
AttrChangeID returns an optional attribute for the "vcs.change.id" semantic convention. It represents the ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system.
func (RefRevisionsDelta) AttrOwnerName ¶
func (RefRevisionsDelta) AttrOwnerName(val string) attribute.KeyValue
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (RefRevisionsDelta) AttrProviderName ¶
func (RefRevisionsDelta) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (RefRevisionsDelta) AttrRepositoryName ¶
func (RefRevisionsDelta) AttrRepositoryName(val string) attribute.KeyValue
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (RefRevisionsDelta) Description ¶
func (RefRevisionsDelta) Description() string
Description returns the semantic convention description of the instrument
func (RefRevisionsDelta) Inst ¶
func (m RefRevisionsDelta) Inst() metric.Int64Gauge
Inst returns the underlying metric instrument.
func (RefRevisionsDelta) Name ¶
func (RefRevisionsDelta) Name() string
Name returns the semantic convention name of the instrument.
func (RefRevisionsDelta) Record ¶
func (m RefRevisionsDelta) Record( ctx context.Context, val int64, refBaseName string, refBaseType RefBaseTypeAttr, refHeadName string, refHeadType RefHeadTypeAttr, repositoryUrlFull string, revisionDeltaDirection RevisionDeltaDirectionAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
The refBaseName is the the name of the reference such as **branch** or **tag** in the repository.
The refBaseType is the the type of the reference in the repository.
The refHeadName is the the name of the reference such as **branch** or **tag** in the repository.
The refHeadType is the the type of the reference in the repository.
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
The revisionDeltaDirection is the the type of revision comparison.
All additional attrs passed are included in the recorded value.
This metric should be reported for each `vcs.revision_delta.direction` value. For example if branch `a` is 3 commits behind and 2 commits ahead of `trunk`, instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers) and `vcs.ref.base.name` is set to `trunk`.
func (RefRevisionsDelta) Unit ¶
func (RefRevisionsDelta) Unit() string
Unit returns the semantic convention unit of the instrument
type RefTime ¶
type RefTime struct { metric.Float64Gauge }
RefTime is an instrument used to record metric values conforming to the "vcs.ref.time" semantic conventions. It represents the time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`.
func NewRefTime ¶
NewRefTime returns a new RefTime instrument.
func (RefTime) AttrOwnerName ¶
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (RefTime) AttrProviderName ¶
func (RefTime) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (RefTime) AttrRepositoryName ¶
AttrRepositoryName returns an optional attribute for the "vcs.repository.name" semantic convention. It represents the human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
func (RefTime) Description ¶
Description returns the semantic convention description of the instrument
func (RefTime) Inst ¶
func (m RefTime) Inst() metric.Float64Gauge
Inst returns the underlying metric instrument.
func (RefTime) Name ¶
Name returns the semantic convention name of the instrument.
func (RefTime) Record ¶
func (m RefTime) Record( ctx context.Context, val float64, refHeadName string, refHeadType RefHeadTypeAttr, repositoryUrlFull string, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
The refHeadName is the the name of the reference such as **branch** or **tag** in the repository.
The refHeadType is the the type of the reference in the repository.
The repositoryUrlFull is the the canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
All additional attrs passed are included in the recorded value.
func (RefTime) Unit ¶
Unit returns the semantic convention unit of the instrument
type RefTypeAttr ¶
type RefTypeAttr string
RefTypeAttr is an attribute conforming to the vcs.ref.type semantic conventions. It represents the type of the reference in the repository.
var ( // RefTypeBranch is the [branch]. // // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch RefTypeBranch RefTypeAttr = "branch" // RefTypeTag is the [tag]. // // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag RefTypeTag RefTypeAttr = "tag" )
type RepositoryCount ¶
type RepositoryCount struct { metric.Int64UpDownCounter }
RepositoryCount is an instrument used to record metric values conforming to the "vcs.repository.count" semantic conventions. It represents the number of repositories in an organization.
func NewRepositoryCount ¶
func NewRepositoryCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (RepositoryCount, error)
NewRepositoryCount returns a new RepositoryCount instrument.
func (RepositoryCount) Add ¶
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
func (RepositoryCount) AttrOwnerName ¶
func (RepositoryCount) AttrOwnerName(val string) attribute.KeyValue
AttrOwnerName returns an optional attribute for the "vcs.owner.name" semantic convention. It represents the group owner within the version control system.
func (RepositoryCount) AttrProviderName ¶
func (RepositoryCount) AttrProviderName(val ProviderNameAttr) attribute.KeyValue
AttrProviderName returns an optional attribute for the "vcs.provider.name" semantic convention. It represents the name of the version control system provider.
func (RepositoryCount) Description ¶
func (RepositoryCount) Description() string
Description returns the semantic convention description of the instrument
func (RepositoryCount) Inst ¶
func (m RepositoryCount) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (RepositoryCount) Name ¶
func (RepositoryCount) Name() string
Name returns the semantic convention name of the instrument.
func (RepositoryCount) Unit ¶
func (RepositoryCount) Unit() string
Unit returns the semantic convention unit of the instrument
type RevisionDeltaDirectionAttr ¶
type RevisionDeltaDirectionAttr string
RevisionDeltaDirectionAttr is an attribute conforming to the vcs.revision_delta.direction semantic conventions. It represents the type of revision comparison.
var ( // RevisionDeltaDirectionBehind is the how many revisions the change is behind // the target ref. RevisionDeltaDirectionBehind RevisionDeltaDirectionAttr = "behind" // RevisionDeltaDirectionAhead is the how many revisions the change is ahead of // the target ref. RevisionDeltaDirectionAhead RevisionDeltaDirectionAttr = "ahead" )
Source Files ¶
metric.go
- Version
- v1.36.0 (latest)
- Published
- May 21, 2025
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 4 minutes ago –
Tools for package owners.