Datadog add the tag of 'remote:gitee'
This commit is contained in:
parent
f51eb4ed22
commit
fab2899a2b
4 changed files with 10 additions and 0 deletions
|
@ -489,6 +489,12 @@ func (c *Config) IsGitea() bool {
|
||||||
return c.Gitea.Server != ""
|
return c.Gitea.Server != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsGitee returns true if the Gitee integration
|
||||||
|
// is activated.
|
||||||
|
func (c *Config) IsGitee() bool {
|
||||||
|
return c.Gitee.ClientID != ""
|
||||||
|
}
|
||||||
|
|
||||||
// IsBitbucket returns true if the Bitbucket Cloud
|
// IsBitbucket returns true if the Bitbucket Cloud
|
||||||
// integration is activated.
|
// integration is activated.
|
||||||
func (c *Config) IsBitbucket() bool {
|
func (c *Config) IsBitbucket() bool {
|
||||||
|
|
|
@ -212,6 +212,7 @@ func provideDatadog(
|
||||||
EnableStash: config.IsStash(),
|
EnableStash: config.IsStash(),
|
||||||
EnableGogs: config.IsGogs(),
|
EnableGogs: config.IsGogs(),
|
||||||
EnableGitea: config.IsGitea(),
|
EnableGitea: config.IsGitea(),
|
||||||
|
EnableGitee: config.IsGitee(),
|
||||||
EnableAgents: !config.Agent.Disabled,
|
EnableAgents: !config.Agent.Disabled,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -29,5 +29,6 @@ type Config struct {
|
||||||
EnableStash bool
|
EnableStash bool
|
||||||
EnableGogs bool
|
EnableGogs bool
|
||||||
EnableGitea bool
|
EnableGitea bool
|
||||||
|
EnableGitee bool
|
||||||
EnableAgents bool
|
EnableAgents bool
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,8 @@ func createTags(config Config) []string {
|
||||||
tags = append(tags, "remote:gogs")
|
tags = append(tags, "remote:gogs")
|
||||||
case config.EnableGitea:
|
case config.EnableGitea:
|
||||||
tags = append(tags, "remote:gitea")
|
tags = append(tags, "remote:gitea")
|
||||||
|
case config.EnableGitee:
|
||||||
|
tags = append(tags, "remote:gitee")
|
||||||
default:
|
default:
|
||||||
tags = append(tags, "remote:undefined")
|
tags = append(tags, "remote:undefined")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue