From 6cd370455c913e54bd079840eb984278976cdf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20SZKIBA?= Date: Thu, 12 Dec 2024 16:51:06 +0100 Subject: [PATCH 1/2] single prometheus metrics endpoint only --- cmd/api.go | 55 +++++++++------------ docs/registry.schema.json | 76 ++++++++++++++--------------- metrics.go | 100 +++++++++++++++++++------------------- metrics_gen.go | 2 +- registry_gen.go | 74 ++++++++++++++-------------- releases/v0.2.3.md | 5 ++ 6 files changed, 154 insertions(+), 158 deletions(-) create mode 100644 releases/v0.2.3.md diff --git a/cmd/api.go b/cmd/api.go index efc8083..95ae4e9 100644 --- a/cmd/api.go +++ b/cmd/api.go @@ -66,50 +66,41 @@ func writeAPIGroupGlobal(registry k6registry.Registry, target string) error { return err } - if err := writeMetrics(registry, target, "", func(_ k6registry.Extension) bool { return true }); err != nil { - return err - } - - for _, tier := range k6registry.Tiers { - err := writeMetrics(registry, filepath.Join(target, "tier"), string(tier)+"-", - func(ext k6registry.Extension) bool { - return ext.Tier == tier - }) - if err != nil { - return err - } - } - - return nil + return writeMetrics(registry, target) } -func writeMetrics( - registry k6registry.Registry, - target string, - prefix string, - cond func(k6registry.Extension) bool, -) error { - metrics := k6registry.CalculateMetricsCond(registry, cond) +const promPrefix = "registry_" - basename := "metrics" +func writeMetrics(registry k6registry.Registry, target string) error { + metrics := k6registry.CalculateMetrics(registry) - if len(prefix) > 0 { - basename = prefix + basename + if err := writeJSON(filepath.Join(target, "metrics.json"), metrics); err != nil { + return err } - basename = filepath.Join(target, basename) + var buff bytes.Buffer - err := writeJSON(basename+".json", metrics) - if err != nil { + if err := metrics.WritePrometheus(&buff, promPrefix, ""); err != nil { return err } - data, err := metrics.MarshalPrometheus() - if err != nil { - return err + for _, tier := range k6registry.Tiers { + stier := string(tier) + + metrics := k6registry.CalculateMetricsCond(registry, func(ext k6registry.Extension) bool { + return ext.Tier == tier + }) + + if err := writeJSON(filepath.Join(target, "tier", stier+"-metrics.json"), metrics); err != nil { + return err + } + + if err := metrics.WritePrometheus(&buff, promPrefix+"tier_"+stier+"_", "Tier "+stier+": "); err != nil { + return err + } } - return os.WriteFile(basename+".txt", data, permFile) //nolint:forbidigo + return writeData(filepath.Join(target, "metrics.txt"), buff.Bytes()) } const gradesvg = `%s%s` //nolint:lll diff --git a/docs/registry.schema.json b/docs/registry.schema.json index aa65083..ff3f86b 100644 --- a/docs/registry.schema.json +++ b/docs/registry.schema.json @@ -402,193 +402,193 @@ "type": "object", "description": "Extension registry metrics.", "properties": { - "registry_extension_count": { + "extension_count": { "type": "integer", "default": 0, "description": "The total number of extensions." }, - "registry_tier_official_count": { + "tier_official_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'official' tier." }, - "registry_tier_unofficial_count": { + "tier_unofficial_count": { "type": "integer", "default": 0, "description": "Number of unofficial extensions." }, - "registry_tier_partner_count": { + "tier_partner_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'partner' tier." }, - "registry_tier_community_count": { + "tier_community_count": { "type": "integer", "default": 0, "description": "Number of extension in the community' tier." }, - "registry_type_javascript_count": { + "type_javascript_count": { "type": "integer", "default": 0, "description": "Number of JavaScript extension." }, - "registry_type_output_count": { + "type_output_count": { "type": "integer", "default": 0, "description": "Number of Output extension." }, - "registry_product_cloud_count": { + "product_cloud_count": { "type": "integer", "default": 0, "description": "Number of extensions available in Grafana Cloud k6." }, - "registry_product_oss_count": { + "product_oss_count": { "type": "integer", "default": 0, "description": "Number of extensions available in Grafana k6." }, - "registry_product_synthetic_count": { + "product_synthetic_count": { "type": "integer", "default": 0, "description": "Number of extensions available in Synthetic Monitoring." }, - "registry_grade_a_count": { + "grade_a_count": { "type": "integer", "default": 0, "description": "Number of A-grade extensions." }, - "registry_grade_b_count": { + "grade_b_count": { "type": "integer", "default": 0, "description": "Number of B-grade extensions." }, - "registry_grade_c_count": { + "grade_c_count": { "type": "integer", "default": 0, "description": "Number of C-grade extensions." }, - "registry_grade_d_count": { + "grade_d_count": { "type": "integer", "default": 0, "description": "Number of D-grade extensions." }, - "registry_grade_e_count": { + "grade_e_count": { "type": "integer", "default": 0, "description": "Number of E-grade extensions." }, - "registry_grade_f_count": { + "grade_f_count": { "type": "integer", "default": 0, "description": "Number of F-grade extensions." }, - "registry_cgo_count": { + "cgo_count": { "type": "integer", "default": 0, "description": "Number of extensions requiring cgo." }, - "registry_category_authentication_count": { + "category_authentication_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'authentication' category." }, - "registry_category_browser_count": { + "category_browser_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'browser' category." }, - "registry_category_data_count": { + "category_data_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'data' category." }, - "registry_category_kubernetes_count": { + "category_kubernetes_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'kubernetes' category." }, - "registry_category_messaging_count": { + "category_messaging_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'messaging' category." }, - "registry_category_misc_count": { + "category_misc_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'misc' category." }, - "registry_category_observability_count": { + "category_observability_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'observability' category." }, - "registry_category_protocol_count": { + "category_protocol_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'protocol' category." }, - "registry_category_reporting_count": { + "category_reporting_count": { "type": "integer", "default": 0, "description": "Number of extensions in the 'reporting' category." }, - "registry_issue_module_count": { + "issue_module_count": { "type": "integer", "default": 0, "description": "Number of extensions without valid go.mod." }, - "registry_issue_replace_count": { + "issue_replace_count": { "type": "integer", "default": 0, "description": "Number of extensions with replace directive in go.mod." }, - "registry_issue_readme_count": { + "issue_readme_count": { "type": "integer", "default": 0, "description": "Number of extensions without readme file." }, - "registry_issue_examples_count": { + "issue_examples_count": { "type": "integer", "default": 0, "description": "Number of extensions without examples directory." }, - "registry_issue_license_count": { + "issue_license_count": { "type": "integer", "default": 0, "description": "Number of extensions without suitable OSS license." }, - "registry_issue_git_count": { + "issue_git_count": { "type": "integer", "default": 0, "description": "Number of extensions without git workdir." }, - "registry_issue_versions_count": { + "issue_versions_count": { "type": "integer", "default": 0, "description": "Number of extensions without semantic versioning git tags." }, - "registry_issue_build_count": { + "issue_build_count": { "type": "integer", "default": 0, "description": "Number of extensions not buildable with the latest k6 version." }, - "registry_issue_smoke_count": { + "issue_smoke_count": { "type": "integer", "default": 0, "description": "Number of extensions without smoke test script." }, - "registry_issue_types_count": { + "issue_types_count": { "type": "integer", "default": 0, "description": "Number of extensions without API declaration file." }, - "registry_issue_codeowners_count": { + "issue_codeowners_count": { "type": "integer", "default": 0, "description": "Number of extensions without CODEOWNERS file." } }, - "example": "{\n \"registry_category_authentication_count\": 2,\n \"registry_category_browser_count\": 1,\n \"registry_category_data_count\": 23,\n \"registry_category_kubernetes_count\": 2,\n \"registry_category_messaging_count\": 11,\n \"registry_category_misc_count\": 16,\n \"registry_category_observability_count\": 12,\n \"registry_category_protocol_count\": 10,\n \"registry_category_reporting_count\": 13,\n \"registry_cgo_count\": 1,\n \"registry_extension_count\": 72,\n \"registry_grade_a_count\": 19,\n \"registry_grade_b_count\": 4,\n \"registry_grade_c_count\": 44,\n \"registry_grade_d_count\": 4,\n \"registry_grade_e_count\": 1,\n \"registry_issue_build_count\": 5,\n \"registry_issue_codeowners_count\": 5,\n \"registry_issue_examples_count\": 16,\n \"registry_issue_replace_count\": 2,\n \"registry_issue_smoke_count\": 51,\n \"registry_issue_types_count\": 44,\n \"registry_product_cloud_count\": 4,\n \"registry_product_oss_count\": 71,\n \"registry_product_synthetic_count\": 2,\n \"registry_tier_community_count\": 54,\n \"registry_tier_official_count\": 18,\n \"registry_tier_unofficial_count\": 6,\n \"registry_type_javascript_count\": 57,\n \"registry_type_output_count\": 16\n}\n" + "example": "{\n \"category_authentication_count\": 2,\n \"category_browser_count\": 1,\n \"category_data_count\": 23,\n \"category_kubernetes_count\": 2,\n \"category_messaging_count\": 11,\n \"category_misc_count\": 16,\n \"category_observability_count\": 12,\n \"category_protocol_count\": 10,\n \"category_reporting_count\": 13,\n \"cgo_count\": 1,\n \"extension_count\": 72,\n \"grade_a_count\": 19,\n \"grade_b_count\": 4,\n \"grade_c_count\": 44,\n \"grade_d_count\": 4,\n \"grade_e_count\": 1,\n \"issue_build_count\": 5,\n \"issue_codeowners_count\": 5,\n \"issue_examples_count\": 16,\n \"issue_replace_count\": 2,\n \"issue_smoke_count\": 51,\n \"issue_types_count\": 44,\n \"product_cloud_count\": 4,\n \"product_oss_count\": 71,\n \"product_synthetic_count\": 2,\n \"tier_community_count\": 54,\n \"tier_official_count\": 18,\n \"tier_unofficial_count\": 6,\n \"type_javascript_count\": 57,\n \"type_output_count\": 16\n}\n" } } } diff --git a/metrics.go b/metrics.go index 92f2035..7673c2d 100644 --- a/metrics.go +++ b/metrics.go @@ -1,9 +1,9 @@ package k6registry import ( - "bytes" "encoding/json" "fmt" + "io" "strings" "time" ) @@ -23,7 +23,7 @@ func CalculateMetricsCond(reg Registry, predicate func(Extension) bool) *Metrics continue } - m.RegistryExtensionCount++ + m.ExtensionCount++ m.tier(ext.Tier) @@ -36,19 +36,19 @@ func CalculateMetricsCond(reg Registry, predicate func(Extension) bool) *Metrics } if len(ext.Products) == 0 { - m.RegistryProductOSSCount++ + m.ProductOSSCount++ } if len(ext.Imports) > 0 { - m.RegistryTypeJavaScriptCount++ + m.TypeJavaScriptCount++ } if len(ext.Outputs) > 0 { - m.RegistryTypeOutputCount++ + m.TypeOutputCount++ } if strings.HasPrefix(ext.Module, "github.com/grafana/") && ext.Tier != TierOfficial { - m.RegistryTierUnofficialCount++ + m.TierUnofficialCount++ } for _, cat := range ext.Categories { @@ -56,7 +56,7 @@ func CalculateMetricsCond(reg Registry, predicate func(Extension) bool) *Metrics } if len(ext.Categories) == 0 { - m.RegistryCategoryMiscCount++ + m.CategoryMiscCount++ } for _, issue := range ext.Compliance.Issues { @@ -64,7 +64,7 @@ func CalculateMetricsCond(reg Registry, predicate func(Extension) bool) *Metrics } if ext.Cgo { - m.RegistryCgoCount++ + m.CgoCount++ } } @@ -74,30 +74,30 @@ func CalculateMetricsCond(reg Registry, predicate func(Extension) bool) *Metrics func (m *Metrics) tier(tier Tier) { switch tier { case TierOfficial: - m.RegistryTierOfficialCount++ + m.TierOfficialCount++ case TierPartner: - m.RegistryTierPartnerCount++ + m.TierPartnerCount++ case TierCommunity: fallthrough default: - m.RegistryTierCommunityCount++ + m.TierCommunityCount++ } } func (m *Metrics) grade(grade Grade) { switch grade { case GradeA: - m.RegistryGradeACount++ + m.GradeACount++ case GradeB: - m.RegistryGradeBCount++ + m.GradeBCount++ case GradeC: - m.RegistryGradeCCount++ + m.GradeCCount++ case GradeD: - m.RegistryGradeDCount++ + m.GradeDCount++ case GradeE: - m.RegistryGradeECount++ + m.GradeECount++ case GradeF: - m.RegistryGradeFCount++ + m.GradeFCount++ default: } } @@ -105,94 +105,94 @@ func (m *Metrics) grade(grade Grade) { func (m *Metrics) product(product Product) { switch product { case ProductCloud: - m.RegistryProductCloudCount++ + m.ProductCloudCount++ case ProductSynthetic: - m.RegistryProductSyntheticCount++ + m.ProductSyntheticCount++ case ProductOSS: fallthrough default: - m.RegistryProductOSSCount++ + m.ProductOSSCount++ } } func (m *Metrics) category(category Category) { switch category { case CategoryAuthentication: - m.RegistryCategoryAuthenticationCount++ + m.CategoryAuthenticationCount++ case CategoryBrowser: - m.RegistryCategoryBrowserCount++ + m.CategoryBrowserCount++ case CategoryData: - m.RegistryCategoryDataCount++ + m.CategoryDataCount++ case CategoryKubernetes: - m.RegistryCategoryKubernetesCount++ + m.CategoryKubernetesCount++ case CategoryMessaging: - m.RegistryCategoryMessagingCount++ + m.CategoryMessagingCount++ case CategoryObservability: - m.RegistryCategoryObservabilityCount++ + m.CategoryObservabilityCount++ case CategoryProtocol: - m.RegistryCategoryProtocolCount++ + m.CategoryProtocolCount++ case CategoryReporting: - m.RegistryCategoryReportingCount++ + m.CategoryReportingCount++ case CategoryMisc: fallthrough default: - m.RegistryCategoryMiscCount++ + m.CategoryMiscCount++ } } func (m *Metrics) issue(issue string) { switch issue { case "module": - m.RegistryIssueModuleCount++ + m.IssueModuleCount++ case "replace": - m.RegistryIssueReplaceCount++ + m.IssueReplaceCount++ case "readme": - m.RegistryIssueReadmeCount++ + m.IssueReadmeCount++ case "examples": - m.RegistryIssueExamplesCount++ + m.IssueExamplesCount++ case "license": - m.RegistryIssueLicenseCount++ + m.IssueLicenseCount++ case "git": - m.RegistryIssueGitCount++ + m.IssueGitCount++ case "versions": - m.RegistryIssueVersionsCount++ + m.IssueVersionsCount++ case "build": - m.RegistryIssueBuildCount++ + m.IssueBuildCount++ case "smoke": - m.RegistryIssueSmokeCount++ + m.IssueSmokeCount++ case "types": - m.RegistryIssueTypesCount++ + m.IssueTypesCount++ case "codeowners": - m.RegistryIssueCodeownersCount++ + m.IssueCodeownersCount++ default: } } -// MarshalPrometheus marshals metrics in Prometheus text format. -func (m *Metrics) MarshalPrometheus() ([]byte, error) { +// WritePrometheus marshals metrics in Prometheus text format. +func (m *Metrics) WritePrometheus(out io.Writer, namePrefix string, helpPrefix string) error { data, err := json.Marshal(m) if err != nil { - return nil, err + return err } var dict map[string]int if err := json.Unmarshal(data, &dict); err != nil { - return nil, err + return err } - var buff bytes.Buffer - now := time.Now().UnixMilli() for name, value := range dict { + fullname := namePrefix + name + if help, hasHelp := metricsHelps[name]; hasHelp { - fmt.Fprintf(&buff, "# HELP %s %s\n", name, help) + fmt.Fprintf(out, "# HELP %s %s\n", fullname, helpPrefix+help) } - fmt.Fprintf(&buff, "# TYPE %s counter\n", name) - fmt.Fprintf(&buff, "%s %d %d\n", name, value, now) + fmt.Fprintf(out, "# TYPE %s counter\n", fullname) + fmt.Fprintf(out, "%s %d %d\n\n", fullname, value, now) } - return buff.Bytes(), nil + return nil } diff --git a/metrics_gen.go b/metrics_gen.go index 1ce5e48..81cb90e 100644 --- a/metrics_gen.go +++ b/metrics_gen.go @@ -2,5 +2,5 @@ package k6registry -var metricsHelps = map[string]string {"registry_extension_count":"The total number of extensions.","registry_tier_official_count":"Number of extensions in the 'official' tier.","registry_tier_unofficial_count":"Number of unofficial extensions.","registry_tier_partner_count":"Number of extensions in the 'partner' tier.","registry_tier_community_count":"Number of extension in the community' tier.","registry_type_javascript_count":"Number of JavaScript extension.","registry_type_output_count":"Number of Output extension.","registry_product_cloud_count":"Number of extensions available in Grafana Cloud k6.","registry_product_oss_count":"Number of extensions available in Grafana k6.","registry_product_synthetic_count":"Number of extensions available in Synthetic Monitoring.","registry_grade_a_count":"Number of A-grade extensions.","registry_grade_b_count":"Number of B-grade extensions.","registry_grade_c_count":"Number of C-grade extensions.","registry_grade_d_count":"Number of D-grade extensions.","registry_grade_e_count":"Number of E-grade extensions.","registry_grade_f_count":"Number of F-grade extensions.","registry_cgo_count":"Number of extensions requiring cgo.","registry_category_authentication_count":"Number of extensions in the 'authentication' category.","registry_category_browser_count":"Number of extensions in the 'browser' category.","registry_category_data_count":"Number of extensions in the 'data' category.","registry_category_kubernetes_count":"Number of extensions in the 'kubernetes' category.","registry_category_messaging_count":"Number of extensions in the 'messaging' category.","registry_category_misc_count":"Number of extensions in the 'misc' category.","registry_category_observability_count":"Number of extensions in the 'observability' category.","registry_category_protocol_count":"Number of extensions in the 'protocol' category.","registry_category_reporting_count":"Number of extensions in the 'reporting' category.","registry_issue_module_count":"Number of extensions without valid go.mod.","registry_issue_replace_count":"Number of extensions with replace directive in go.mod.","registry_issue_readme_count":"Number of extensions without readme file.","registry_issue_examples_count":"Number of extensions without examples directory.","registry_issue_license_count":"Number of extensions without suitable OSS license.","registry_issue_git_count":"Number of extensions without git workdir.","registry_issue_versions_count":"Number of extensions without semantic versioning git tags.","registry_issue_build_count":"Number of extensions not buildable with the latest k6 version.","registry_issue_smoke_count":"Number of extensions without smoke test script.","registry_issue_types_count":"Number of extensions without API declaration file.","registry_issue_codeowners_count":"Number of extensions without CODEOWNERS file."} +var metricsHelps = map[string]string {"extension_count":"The total number of extensions.","tier_official_count":"Number of extensions in the 'official' tier.","tier_unofficial_count":"Number of unofficial extensions.","tier_partner_count":"Number of extensions in the 'partner' tier.","tier_community_count":"Number of extension in the community' tier.","type_javascript_count":"Number of JavaScript extension.","type_output_count":"Number of Output extension.","product_cloud_count":"Number of extensions available in Grafana Cloud k6.","product_oss_count":"Number of extensions available in Grafana k6.","product_synthetic_count":"Number of extensions available in Synthetic Monitoring.","grade_a_count":"Number of A-grade extensions.","grade_b_count":"Number of B-grade extensions.","grade_c_count":"Number of C-grade extensions.","grade_d_count":"Number of D-grade extensions.","grade_e_count":"Number of E-grade extensions.","grade_f_count":"Number of F-grade extensions.","cgo_count":"Number of extensions requiring cgo.","category_authentication_count":"Number of extensions in the 'authentication' category.","category_browser_count":"Number of extensions in the 'browser' category.","category_data_count":"Number of extensions in the 'data' category.","category_kubernetes_count":"Number of extensions in the 'kubernetes' category.","category_messaging_count":"Number of extensions in the 'messaging' category.","category_misc_count":"Number of extensions in the 'misc' category.","category_observability_count":"Number of extensions in the 'observability' category.","category_protocol_count":"Number of extensions in the 'protocol' category.","category_reporting_count":"Number of extensions in the 'reporting' category.","issue_module_count":"Number of extensions without valid go.mod.","issue_replace_count":"Number of extensions with replace directive in go.mod.","issue_readme_count":"Number of extensions without readme file.","issue_examples_count":"Number of extensions without examples directory.","issue_license_count":"Number of extensions without suitable OSS license.","issue_git_count":"Number of extensions without git workdir.","issue_versions_count":"Number of extensions without semantic versioning git tags.","issue_build_count":"Number of extensions not buildable with the latest k6 version.","issue_smoke_count":"Number of extensions without smoke test script.","issue_types_count":"Number of extensions without API declaration file.","issue_codeowners_count":"Number of extensions without CODEOWNERS file."} diff --git a/registry_gen.go b/registry_gen.go index dd1721d..4b0c494 100644 --- a/registry_gen.go +++ b/registry_gen.go @@ -202,115 +202,115 @@ const GradeG Grade = "G" // Extension registry metrics. type Metrics struct { // Number of extensions in the 'authentication' category. - RegistryCategoryAuthenticationCount int `json:"registry_category_authentication_count,omitempty" yaml:"registry_category_authentication_count,omitempty" mapstructure:"registry_category_authentication_count,omitempty"` + CategoryAuthenticationCount int `json:"category_authentication_count,omitempty" yaml:"category_authentication_count,omitempty" mapstructure:"category_authentication_count,omitempty"` // Number of extensions in the 'browser' category. - RegistryCategoryBrowserCount int `json:"registry_category_browser_count,omitempty" yaml:"registry_category_browser_count,omitempty" mapstructure:"registry_category_browser_count,omitempty"` + CategoryBrowserCount int `json:"category_browser_count,omitempty" yaml:"category_browser_count,omitempty" mapstructure:"category_browser_count,omitempty"` // Number of extensions in the 'data' category. - RegistryCategoryDataCount int `json:"registry_category_data_count,omitempty" yaml:"registry_category_data_count,omitempty" mapstructure:"registry_category_data_count,omitempty"` + CategoryDataCount int `json:"category_data_count,omitempty" yaml:"category_data_count,omitempty" mapstructure:"category_data_count,omitempty"` // Number of extensions in the 'kubernetes' category. - RegistryCategoryKubernetesCount int `json:"registry_category_kubernetes_count,omitempty" yaml:"registry_category_kubernetes_count,omitempty" mapstructure:"registry_category_kubernetes_count,omitempty"` + CategoryKubernetesCount int `json:"category_kubernetes_count,omitempty" yaml:"category_kubernetes_count,omitempty" mapstructure:"category_kubernetes_count,omitempty"` // Number of extensions in the 'messaging' category. - RegistryCategoryMessagingCount int `json:"registry_category_messaging_count,omitempty" yaml:"registry_category_messaging_count,omitempty" mapstructure:"registry_category_messaging_count,omitempty"` + CategoryMessagingCount int `json:"category_messaging_count,omitempty" yaml:"category_messaging_count,omitempty" mapstructure:"category_messaging_count,omitempty"` // Number of extensions in the 'misc' category. - RegistryCategoryMiscCount int `json:"registry_category_misc_count,omitempty" yaml:"registry_category_misc_count,omitempty" mapstructure:"registry_category_misc_count,omitempty"` + CategoryMiscCount int `json:"category_misc_count,omitempty" yaml:"category_misc_count,omitempty" mapstructure:"category_misc_count,omitempty"` // Number of extensions in the 'observability' category. - RegistryCategoryObservabilityCount int `json:"registry_category_observability_count,omitempty" yaml:"registry_category_observability_count,omitempty" mapstructure:"registry_category_observability_count,omitempty"` + CategoryObservabilityCount int `json:"category_observability_count,omitempty" yaml:"category_observability_count,omitempty" mapstructure:"category_observability_count,omitempty"` // Number of extensions in the 'protocol' category. - RegistryCategoryProtocolCount int `json:"registry_category_protocol_count,omitempty" yaml:"registry_category_protocol_count,omitempty" mapstructure:"registry_category_protocol_count,omitempty"` + CategoryProtocolCount int `json:"category_protocol_count,omitempty" yaml:"category_protocol_count,omitempty" mapstructure:"category_protocol_count,omitempty"` // Number of extensions in the 'reporting' category. - RegistryCategoryReportingCount int `json:"registry_category_reporting_count,omitempty" yaml:"registry_category_reporting_count,omitempty" mapstructure:"registry_category_reporting_count,omitempty"` + CategoryReportingCount int `json:"category_reporting_count,omitempty" yaml:"category_reporting_count,omitempty" mapstructure:"category_reporting_count,omitempty"` // Number of extensions requiring cgo. - RegistryCgoCount int `json:"registry_cgo_count,omitempty" yaml:"registry_cgo_count,omitempty" mapstructure:"registry_cgo_count,omitempty"` + CgoCount int `json:"cgo_count,omitempty" yaml:"cgo_count,omitempty" mapstructure:"cgo_count,omitempty"` // The total number of extensions. - RegistryExtensionCount int `json:"registry_extension_count,omitempty" yaml:"registry_extension_count,omitempty" mapstructure:"registry_extension_count,omitempty"` + ExtensionCount int `json:"extension_count,omitempty" yaml:"extension_count,omitempty" mapstructure:"extension_count,omitempty"` // Number of A-grade extensions. - RegistryGradeACount int `json:"registry_grade_a_count,omitempty" yaml:"registry_grade_a_count,omitempty" mapstructure:"registry_grade_a_count,omitempty"` + GradeACount int `json:"grade_a_count,omitempty" yaml:"grade_a_count,omitempty" mapstructure:"grade_a_count,omitempty"` // Number of B-grade extensions. - RegistryGradeBCount int `json:"registry_grade_b_count,omitempty" yaml:"registry_grade_b_count,omitempty" mapstructure:"registry_grade_b_count,omitempty"` + GradeBCount int `json:"grade_b_count,omitempty" yaml:"grade_b_count,omitempty" mapstructure:"grade_b_count,omitempty"` // Number of C-grade extensions. - RegistryGradeCCount int `json:"registry_grade_c_count,omitempty" yaml:"registry_grade_c_count,omitempty" mapstructure:"registry_grade_c_count,omitempty"` + GradeCCount int `json:"grade_c_count,omitempty" yaml:"grade_c_count,omitempty" mapstructure:"grade_c_count,omitempty"` // Number of D-grade extensions. - RegistryGradeDCount int `json:"registry_grade_d_count,omitempty" yaml:"registry_grade_d_count,omitempty" mapstructure:"registry_grade_d_count,omitempty"` + GradeDCount int `json:"grade_d_count,omitempty" yaml:"grade_d_count,omitempty" mapstructure:"grade_d_count,omitempty"` // Number of E-grade extensions. - RegistryGradeECount int `json:"registry_grade_e_count,omitempty" yaml:"registry_grade_e_count,omitempty" mapstructure:"registry_grade_e_count,omitempty"` + GradeECount int `json:"grade_e_count,omitempty" yaml:"grade_e_count,omitempty" mapstructure:"grade_e_count,omitempty"` // Number of F-grade extensions. - RegistryGradeFCount int `json:"registry_grade_f_count,omitempty" yaml:"registry_grade_f_count,omitempty" mapstructure:"registry_grade_f_count,omitempty"` + GradeFCount int `json:"grade_f_count,omitempty" yaml:"grade_f_count,omitempty" mapstructure:"grade_f_count,omitempty"` // Number of extensions not buildable with the latest k6 version. - RegistryIssueBuildCount int `json:"registry_issue_build_count,omitempty" yaml:"registry_issue_build_count,omitempty" mapstructure:"registry_issue_build_count,omitempty"` + IssueBuildCount int `json:"issue_build_count,omitempty" yaml:"issue_build_count,omitempty" mapstructure:"issue_build_count,omitempty"` // Number of extensions without CODEOWNERS file. - RegistryIssueCodeownersCount int `json:"registry_issue_codeowners_count,omitempty" yaml:"registry_issue_codeowners_count,omitempty" mapstructure:"registry_issue_codeowners_count,omitempty"` + IssueCodeownersCount int `json:"issue_codeowners_count,omitempty" yaml:"issue_codeowners_count,omitempty" mapstructure:"issue_codeowners_count,omitempty"` // Number of extensions without examples directory. - RegistryIssueExamplesCount int `json:"registry_issue_examples_count,omitempty" yaml:"registry_issue_examples_count,omitempty" mapstructure:"registry_issue_examples_count,omitempty"` + IssueExamplesCount int `json:"issue_examples_count,omitempty" yaml:"issue_examples_count,omitempty" mapstructure:"issue_examples_count,omitempty"` // Number of extensions without git workdir. - RegistryIssueGitCount int `json:"registry_issue_git_count,omitempty" yaml:"registry_issue_git_count,omitempty" mapstructure:"registry_issue_git_count,omitempty"` + IssueGitCount int `json:"issue_git_count,omitempty" yaml:"issue_git_count,omitempty" mapstructure:"issue_git_count,omitempty"` // Number of extensions without suitable OSS license. - RegistryIssueLicenseCount int `json:"registry_issue_license_count,omitempty" yaml:"registry_issue_license_count,omitempty" mapstructure:"registry_issue_license_count,omitempty"` + IssueLicenseCount int `json:"issue_license_count,omitempty" yaml:"issue_license_count,omitempty" mapstructure:"issue_license_count,omitempty"` // Number of extensions without valid go.mod. - RegistryIssueModuleCount int `json:"registry_issue_module_count,omitempty" yaml:"registry_issue_module_count,omitempty" mapstructure:"registry_issue_module_count,omitempty"` + IssueModuleCount int `json:"issue_module_count,omitempty" yaml:"issue_module_count,omitempty" mapstructure:"issue_module_count,omitempty"` // Number of extensions without readme file. - RegistryIssueReadmeCount int `json:"registry_issue_readme_count,omitempty" yaml:"registry_issue_readme_count,omitempty" mapstructure:"registry_issue_readme_count,omitempty"` + IssueReadmeCount int `json:"issue_readme_count,omitempty" yaml:"issue_readme_count,omitempty" mapstructure:"issue_readme_count,omitempty"` // Number of extensions with replace directive in go.mod. - RegistryIssueReplaceCount int `json:"registry_issue_replace_count,omitempty" yaml:"registry_issue_replace_count,omitempty" mapstructure:"registry_issue_replace_count,omitempty"` + IssueReplaceCount int `json:"issue_replace_count,omitempty" yaml:"issue_replace_count,omitempty" mapstructure:"issue_replace_count,omitempty"` // Number of extensions without smoke test script. - RegistryIssueSmokeCount int `json:"registry_issue_smoke_count,omitempty" yaml:"registry_issue_smoke_count,omitempty" mapstructure:"registry_issue_smoke_count,omitempty"` + IssueSmokeCount int `json:"issue_smoke_count,omitempty" yaml:"issue_smoke_count,omitempty" mapstructure:"issue_smoke_count,omitempty"` // Number of extensions without API declaration file. - RegistryIssueTypesCount int `json:"registry_issue_types_count,omitempty" yaml:"registry_issue_types_count,omitempty" mapstructure:"registry_issue_types_count,omitempty"` + IssueTypesCount int `json:"issue_types_count,omitempty" yaml:"issue_types_count,omitempty" mapstructure:"issue_types_count,omitempty"` // Number of extensions without semantic versioning git tags. - RegistryIssueVersionsCount int `json:"registry_issue_versions_count,omitempty" yaml:"registry_issue_versions_count,omitempty" mapstructure:"registry_issue_versions_count,omitempty"` + IssueVersionsCount int `json:"issue_versions_count,omitempty" yaml:"issue_versions_count,omitempty" mapstructure:"issue_versions_count,omitempty"` // Number of extensions available in Grafana Cloud k6. - RegistryProductCloudCount int `json:"registry_product_cloud_count,omitempty" yaml:"registry_product_cloud_count,omitempty" mapstructure:"registry_product_cloud_count,omitempty"` + ProductCloudCount int `json:"product_cloud_count,omitempty" yaml:"product_cloud_count,omitempty" mapstructure:"product_cloud_count,omitempty"` // Number of extensions available in Grafana k6. - RegistryProductOSSCount int `json:"registry_product_oss_count,omitempty" yaml:"registry_product_oss_count,omitempty" mapstructure:"registry_product_oss_count,omitempty"` + ProductOSSCount int `json:"product_oss_count,omitempty" yaml:"product_oss_count,omitempty" mapstructure:"product_oss_count,omitempty"` // Number of extensions available in Synthetic Monitoring. - RegistryProductSyntheticCount int `json:"registry_product_synthetic_count,omitempty" yaml:"registry_product_synthetic_count,omitempty" mapstructure:"registry_product_synthetic_count,omitempty"` + ProductSyntheticCount int `json:"product_synthetic_count,omitempty" yaml:"product_synthetic_count,omitempty" mapstructure:"product_synthetic_count,omitempty"` // Number of extension in the community' tier. - RegistryTierCommunityCount int `json:"registry_tier_community_count,omitempty" yaml:"registry_tier_community_count,omitempty" mapstructure:"registry_tier_community_count,omitempty"` + TierCommunityCount int `json:"tier_community_count,omitempty" yaml:"tier_community_count,omitempty" mapstructure:"tier_community_count,omitempty"` // Number of extensions in the 'official' tier. - RegistryTierOfficialCount int `json:"registry_tier_official_count,omitempty" yaml:"registry_tier_official_count,omitempty" mapstructure:"registry_tier_official_count,omitempty"` + TierOfficialCount int `json:"tier_official_count,omitempty" yaml:"tier_official_count,omitempty" mapstructure:"tier_official_count,omitempty"` // Number of extensions in the 'partner' tier. - RegistryTierPartnerCount int `json:"registry_tier_partner_count,omitempty" yaml:"registry_tier_partner_count,omitempty" mapstructure:"registry_tier_partner_count,omitempty"` + TierPartnerCount int `json:"tier_partner_count,omitempty" yaml:"tier_partner_count,omitempty" mapstructure:"tier_partner_count,omitempty"` // Number of unofficial extensions. - RegistryTierUnofficialCount int `json:"registry_tier_unofficial_count,omitempty" yaml:"registry_tier_unofficial_count,omitempty" mapstructure:"registry_tier_unofficial_count,omitempty"` + TierUnofficialCount int `json:"tier_unofficial_count,omitempty" yaml:"tier_unofficial_count,omitempty" mapstructure:"tier_unofficial_count,omitempty"` // Number of JavaScript extension. - RegistryTypeJavaScriptCount int `json:"registry_type_javascript_count,omitempty" yaml:"registry_type_javascript_count,omitempty" mapstructure:"registry_type_javascript_count,omitempty"` + TypeJavaScriptCount int `json:"type_javascript_count,omitempty" yaml:"type_javascript_count,omitempty" mapstructure:"type_javascript_count,omitempty"` // Number of Output extension. - RegistryTypeOutputCount int `json:"registry_type_output_count,omitempty" yaml:"registry_type_output_count,omitempty" mapstructure:"registry_type_output_count,omitempty"` + TypeOutputCount int `json:"type_output_count,omitempty" yaml:"type_output_count,omitempty" mapstructure:"type_output_count,omitempty"` } type Product string diff --git a/releases/v0.2.3.md b/releases/v0.2.3.md new file mode 100644 index 0000000..3247f63 --- /dev/null +++ b/releases/v0.2.3.md @@ -0,0 +1,5 @@ +k6registry `v0.2.3` is here 🎉! + +This release includes improvements to the generated metrics: +- There is only one Prometheus metrics endpoint, /metrics.txt, and it contains all Prometheus metrics. +- Metrics in JSON format do not have a registry_ prefix in their property names. From edce8a74efb3bb3471b7b55400ed514c46b37a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20SZKIBA?= Date: Thu, 12 Dec 2024 17:12:19 +0100 Subject: [PATCH 2/2] docs: update examples --- README.md | 5 +- docs/example-api.txt | 3 - docs/example-api/catalog.json | 2 +- docs/example-api/category/data.json | 2 +- docs/example-api/grade/B.json | 2 +- docs/example-api/grade/at-least/B.json | 2 +- docs/example-api/grade/at-least/C.json | 2 +- docs/example-api/grade/at-least/D.json | 2 +- docs/example-api/grade/at-least/E.json | 2 +- docs/example-api/grade/at-least/F.json | 2 +- docs/example-api/metrics.json | 36 ++-- docs/example-api/metrics.txt | 202 ++++++++++++++---- .../grafana/xk6-faker/extension.json | 2 +- docs/example-api/product/oss-catalog.json | 2 +- docs/example-api/product/oss.json | 2 +- docs/example-api/registry.json | 2 +- .../tier/at-least/community-catalog.json | 2 +- docs/example-api/tier/at-least/community.json | 2 +- .../tier/at-least/official-catalog.json | 2 +- docs/example-api/tier/at-least/official.json | 2 +- .../tier/at-least/partner-catalog.json | 2 +- docs/example-api/tier/at-least/partner.json | 2 +- docs/example-api/tier/community-metrics.json | 16 +- docs/example-api/tier/community-metrics.txt | 24 --- docs/example-api/tier/official-catalog.json | 2 +- docs/example-api/tier/official-metrics.json | 32 +-- docs/example-api/tier/official-metrics.txt | 48 ----- docs/example-api/tier/official.json | 2 +- docs/example-api/tier/partner-metrics.txt | 0 docs/example-catalog.json | 2 +- docs/example.json | 2 +- 31 files changed, 223 insertions(+), 187 deletions(-) delete mode 100644 docs/example-api/tier/community-metrics.txt delete mode 100644 docs/example-api/tier/official-metrics.txt delete mode 100644 docs/example-api/tier/partner-metrics.txt diff --git a/README.md b/README.md index 07c25c5..4807591 100644 --- a/README.md +++ b/README.md @@ -280,7 +280,7 @@ Registry generated from the source above. "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], @@ -618,15 +618,12 @@ docs/example-api ├── community-catalog.json ├── community.json ├── community-metrics.json - ├── community-metrics.txt ├── official-catalog.json ├── official.json ├── official-metrics.json - ├── official-metrics.txt ├── partner-catalog.json ├── partner.json ├── partner-metrics.json - ├── partner-metrics.txt └── at-least ├── community-catalog.json ├── community.json diff --git a/docs/example-api.txt b/docs/example-api.txt index c352c4e..60b4797 100644 --- a/docs/example-api.txt +++ b/docs/example-api.txt @@ -66,15 +66,12 @@ docs/example-api ├── community-catalog.json ├── community.json ├── community-metrics.json - ├── community-metrics.txt ├── official-catalog.json ├── official.json ├── official-metrics.json - ├── official-metrics.txt ├── partner-catalog.json ├── partner.json ├── partner-metrics.json - ├── partner-metrics.txt └── at-least ├── community-catalog.json ├── community.json diff --git a/docs/example-api/catalog.json b/docs/example-api/catalog.json index 4b24aae..7e41083 100644 --- a/docs/example-api/catalog.json +++ b/docs/example-api/catalog.json @@ -333,7 +333,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/category/data.json b/docs/example-api/category/data.json index 662a08c..980f445 100644 --- a/docs/example-api/category/data.json +++ b/docs/example-api/category/data.json @@ -77,7 +77,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/grade/B.json b/docs/example-api/grade/B.json index 662a08c..980f445 100644 --- a/docs/example-api/grade/B.json +++ b/docs/example-api/grade/B.json @@ -77,7 +77,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/grade/at-least/B.json b/docs/example-api/grade/at-least/B.json index 44b21b4..8de8ec2 100644 --- a/docs/example-api/grade/at-least/B.json +++ b/docs/example-api/grade/at-least/B.json @@ -149,7 +149,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/grade/at-least/C.json b/docs/example-api/grade/at-least/C.json index c08edb7..714acac 100644 --- a/docs/example-api/grade/at-least/C.json +++ b/docs/example-api/grade/at-least/C.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/grade/at-least/D.json b/docs/example-api/grade/at-least/D.json index c08edb7..714acac 100644 --- a/docs/example-api/grade/at-least/D.json +++ b/docs/example-api/grade/at-least/D.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/grade/at-least/E.json b/docs/example-api/grade/at-least/E.json index c08edb7..714acac 100644 --- a/docs/example-api/grade/at-least/E.json +++ b/docs/example-api/grade/at-least/E.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/grade/at-least/F.json b/docs/example-api/grade/at-least/F.json index c08edb7..714acac 100644 --- a/docs/example-api/grade/at-least/F.json +++ b/docs/example-api/grade/at-least/F.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/metrics.json b/docs/example-api/metrics.json index 9542036..bc6465e 100644 --- a/docs/example-api/metrics.json +++ b/docs/example-api/metrics.json @@ -1,20 +1,20 @@ { - "registry_category_data_count": 2, - "registry_category_kubernetes_count": 1, - "registry_category_misc_count": 1, - "registry_category_observability_count": 1, - "registry_category_reporting_count": 1, - "registry_extension_count": 5, - "registry_grade_a_count": 1, - "registry_grade_b_count": 2, - "registry_grade_c_count": 2, - "registry_issue_examples_count": 1, - "registry_issue_smoke_count": 4, - "registry_issue_types_count": 2, - "registry_product_cloud_count": 1, - "registry_product_oss_count": 5, - "registry_tier_community_count": 1, - "registry_tier_official_count": 4, - "registry_type_javascript_count": 4, - "registry_type_output_count": 1 + "category_data_count": 2, + "category_kubernetes_count": 1, + "category_misc_count": 1, + "category_observability_count": 1, + "category_reporting_count": 1, + "extension_count": 5, + "grade_a_count": 1, + "grade_b_count": 2, + "grade_c_count": 2, + "issue_examples_count": 1, + "issue_smoke_count": 4, + "issue_types_count": 2, + "product_cloud_count": 1, + "product_oss_count": 5, + "tier_community_count": 1, + "tier_official_count": 4, + "type_javascript_count": 4, + "type_output_count": 1 } diff --git a/docs/example-api/metrics.txt b/docs/example-api/metrics.txt index 40cf492..d53b18c 100644 --- a/docs/example-api/metrics.txt +++ b/docs/example-api/metrics.txt @@ -1,54 +1,168 @@ -# HELP registry_category_misc_count Number of extensions in the 'misc' category. -# TYPE registry_category_misc_count counter -registry_category_misc_count 1 1733945081492 -# HELP registry_grade_b_count Number of B-grade extensions. -# TYPE registry_grade_b_count counter -registry_grade_b_count 2 1733945081492 -# HELP registry_issue_types_count Number of extensions without API declaration file. -# TYPE registry_issue_types_count counter -registry_issue_types_count 2 1733945081492 # HELP registry_product_oss_count Number of extensions available in Grafana k6. # TYPE registry_product_oss_count counter -registry_product_oss_count 5 1733945081492 -# HELP registry_type_output_count Number of Output extension. -# TYPE registry_type_output_count counter -registry_type_output_count 1 1733945081492 -# HELP registry_category_observability_count Number of extensions in the 'observability' category. -# TYPE registry_category_observability_count counter -registry_category_observability_count 1 1733945081492 -# HELP registry_issue_examples_count Number of extensions without examples directory. -# TYPE registry_issue_examples_count counter -registry_issue_examples_count 1 1733945081492 -# HELP registry_issue_smoke_count Number of extensions without smoke test script. -# TYPE registry_issue_smoke_count counter -registry_issue_smoke_count 4 1733945081492 -# HELP registry_product_cloud_count Number of extensions available in Grafana Cloud k6. -# TYPE registry_product_cloud_count counter -registry_product_cloud_count 1 1733945081492 +registry_product_oss_count 5 1734019371217 + # HELP registry_tier_official_count Number of extensions in the 'official' tier. # TYPE registry_tier_official_count counter -registry_tier_official_count 4 1733945081492 +registry_tier_official_count 4 1734019371217 + +# HELP registry_type_javascript_count Number of JavaScript extension. +# TYPE registry_type_javascript_count counter +registry_type_javascript_count 4 1734019371217 + # HELP registry_category_data_count Number of extensions in the 'data' category. # TYPE registry_category_data_count counter -registry_category_data_count 2 1733945081492 -# HELP registry_extension_count The total number of extensions. -# TYPE registry_extension_count counter -registry_extension_count 5 1733945081492 -# HELP registry_tier_community_count Number of extension in the community' tier. -# TYPE registry_tier_community_count counter -registry_tier_community_count 1 1733945081492 -# HELP registry_category_kubernetes_count Number of extensions in the 'kubernetes' category. -# TYPE registry_category_kubernetes_count counter -registry_category_kubernetes_count 1 1733945081492 +registry_category_data_count 2 1734019371217 + +# HELP registry_category_misc_count Number of extensions in the 'misc' category. +# TYPE registry_category_misc_count counter +registry_category_misc_count 1 1734019371217 + # HELP registry_category_reporting_count Number of extensions in the 'reporting' category. # TYPE registry_category_reporting_count counter -registry_category_reporting_count 1 1733945081492 -# HELP registry_grade_a_count Number of A-grade extensions. -# TYPE registry_grade_a_count counter -registry_grade_a_count 1 1733945081492 +registry_category_reporting_count 1 1734019371217 + # HELP registry_grade_c_count Number of C-grade extensions. # TYPE registry_grade_c_count counter -registry_grade_c_count 2 1733945081492 -# HELP registry_type_javascript_count Number of JavaScript extension. -# TYPE registry_type_javascript_count counter -registry_type_javascript_count 4 1733945081492 +registry_grade_c_count 2 1734019371217 + +# HELP registry_issue_examples_count Number of extensions without examples directory. +# TYPE registry_issue_examples_count counter +registry_issue_examples_count 1 1734019371217 + +# HELP registry_grade_a_count Number of A-grade extensions. +# TYPE registry_grade_a_count counter +registry_grade_a_count 1 1734019371217 + +# HELP registry_grade_b_count Number of B-grade extensions. +# TYPE registry_grade_b_count counter +registry_grade_b_count 2 1734019371217 + +# HELP registry_product_cloud_count Number of extensions available in Grafana Cloud k6. +# TYPE registry_product_cloud_count counter +registry_product_cloud_count 1 1734019371217 + +# HELP registry_tier_community_count Number of extension in the community' tier. +# TYPE registry_tier_community_count counter +registry_tier_community_count 1 1734019371217 + +# HELP registry_category_kubernetes_count Number of extensions in the 'kubernetes' category. +# TYPE registry_category_kubernetes_count counter +registry_category_kubernetes_count 1 1734019371217 + +# HELP registry_category_observability_count Number of extensions in the 'observability' category. +# TYPE registry_category_observability_count counter +registry_category_observability_count 1 1734019371217 + +# HELP registry_issue_smoke_count Number of extensions without smoke test script. +# TYPE registry_issue_smoke_count counter +registry_issue_smoke_count 4 1734019371217 + +# HELP registry_issue_types_count Number of extensions without API declaration file. +# TYPE registry_issue_types_count counter +registry_issue_types_count 2 1734019371217 + +# HELP registry_type_output_count Number of Output extension. +# TYPE registry_type_output_count counter +registry_type_output_count 1 1734019371217 + +# HELP registry_extension_count The total number of extensions. +# TYPE registry_extension_count counter +registry_extension_count 5 1734019371217 + +# HELP registry_tier_official_category_kubernetes_count Tier official: Number of extensions in the 'kubernetes' category. +# TYPE registry_tier_official_category_kubernetes_count counter +registry_tier_official_category_kubernetes_count 1 1734019371217 + +# HELP registry_tier_official_issue_examples_count Tier official: Number of extensions without examples directory. +# TYPE registry_tier_official_issue_examples_count counter +registry_tier_official_issue_examples_count 1 1734019371217 + +# HELP registry_tier_official_tier_official_count Tier official: Number of extensions in the 'official' tier. +# TYPE registry_tier_official_tier_official_count counter +registry_tier_official_tier_official_count 4 1734019371217 + +# HELP registry_tier_official_category_reporting_count Tier official: Number of extensions in the 'reporting' category. +# TYPE registry_tier_official_category_reporting_count counter +registry_tier_official_category_reporting_count 1 1734019371217 + +# HELP registry_tier_official_product_cloud_count Tier official: Number of extensions available in Grafana Cloud k6. +# TYPE registry_tier_official_product_cloud_count counter +registry_tier_official_product_cloud_count 1 1734019371217 + +# HELP registry_tier_official_product_oss_count Tier official: Number of extensions available in Grafana k6. +# TYPE registry_tier_official_product_oss_count counter +registry_tier_official_product_oss_count 4 1734019371217 + +# HELP registry_tier_official_type_output_count Tier official: Number of Output extension. +# TYPE registry_tier_official_type_output_count counter +registry_tier_official_type_output_count 1 1734019371217 + +# HELP registry_tier_official_category_data_count Tier official: Number of extensions in the 'data' category. +# TYPE registry_tier_official_category_data_count counter +registry_tier_official_category_data_count 2 1734019371217 + +# HELP registry_tier_official_extension_count Tier official: The total number of extensions. +# TYPE registry_tier_official_extension_count counter +registry_tier_official_extension_count 4 1734019371217 + +# HELP registry_tier_official_grade_a_count Tier official: Number of A-grade extensions. +# TYPE registry_tier_official_grade_a_count counter +registry_tier_official_grade_a_count 1 1734019371217 + +# HELP registry_tier_official_grade_b_count Tier official: Number of B-grade extensions. +# TYPE registry_tier_official_grade_b_count counter +registry_tier_official_grade_b_count 2 1734019371217 + +# HELP registry_tier_official_issue_smoke_count Tier official: Number of extensions without smoke test script. +# TYPE registry_tier_official_issue_smoke_count counter +registry_tier_official_issue_smoke_count 3 1734019371217 + +# HELP registry_tier_official_issue_types_count Tier official: Number of extensions without API declaration file. +# TYPE registry_tier_official_issue_types_count counter +registry_tier_official_issue_types_count 1 1734019371217 + +# HELP registry_tier_official_category_observability_count Tier official: Number of extensions in the 'observability' category. +# TYPE registry_tier_official_category_observability_count counter +registry_tier_official_category_observability_count 1 1734019371217 + +# HELP registry_tier_official_grade_c_count Tier official: Number of C-grade extensions. +# TYPE registry_tier_official_grade_c_count counter +registry_tier_official_grade_c_count 1 1734019371217 + +# HELP registry_tier_official_type_javascript_count Tier official: Number of JavaScript extension. +# TYPE registry_tier_official_type_javascript_count counter +registry_tier_official_type_javascript_count 3 1734019371217 + +# HELP registry_tier_community_type_javascript_count Tier community: Number of JavaScript extension. +# TYPE registry_tier_community_type_javascript_count counter +registry_tier_community_type_javascript_count 1 1734019371217 + +# HELP registry_tier_community_category_misc_count Tier community: Number of extensions in the 'misc' category. +# TYPE registry_tier_community_category_misc_count counter +registry_tier_community_category_misc_count 1 1734019371217 + +# HELP registry_tier_community_extension_count Tier community: The total number of extensions. +# TYPE registry_tier_community_extension_count counter +registry_tier_community_extension_count 1 1734019371217 + +# HELP registry_tier_community_grade_c_count Tier community: Number of C-grade extensions. +# TYPE registry_tier_community_grade_c_count counter +registry_tier_community_grade_c_count 1 1734019371217 + +# HELP registry_tier_community_issue_smoke_count Tier community: Number of extensions without smoke test script. +# TYPE registry_tier_community_issue_smoke_count counter +registry_tier_community_issue_smoke_count 1 1734019371217 + +# HELP registry_tier_community_issue_types_count Tier community: Number of extensions without API declaration file. +# TYPE registry_tier_community_issue_types_count counter +registry_tier_community_issue_types_count 1 1734019371217 + +# HELP registry_tier_community_product_oss_count Tier community: Number of extensions available in Grafana k6. +# TYPE registry_tier_community_product_oss_count counter +registry_tier_community_product_oss_count 1 1734019371217 + +# HELP registry_tier_community_tier_community_count Tier community: Number of extension in the community' tier. +# TYPE registry_tier_community_tier_community_count counter +registry_tier_community_tier_community_count 1 1734019371217 + diff --git a/docs/example-api/module/github.com/grafana/xk6-faker/extension.json b/docs/example-api/module/github.com/grafana/xk6-faker/extension.json index 05d88ef..839a936 100644 --- a/docs/example-api/module/github.com/grafana/xk6-faker/extension.json +++ b/docs/example-api/module/github.com/grafana/xk6-faker/extension.json @@ -26,7 +26,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/product/oss-catalog.json b/docs/example-api/product/oss-catalog.json index 4b24aae..7e41083 100644 --- a/docs/example-api/product/oss-catalog.json +++ b/docs/example-api/product/oss-catalog.json @@ -333,7 +333,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/product/oss.json b/docs/example-api/product/oss.json index 092264f..557e2f1 100644 --- a/docs/example-api/product/oss.json +++ b/docs/example-api/product/oss.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/registry.json b/docs/example-api/registry.json index 092264f..557e2f1 100644 --- a/docs/example-api/registry.json +++ b/docs/example-api/registry.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/at-least/community-catalog.json b/docs/example-api/tier/at-least/community-catalog.json index 4b24aae..7e41083 100644 --- a/docs/example-api/tier/at-least/community-catalog.json +++ b/docs/example-api/tier/at-least/community-catalog.json @@ -333,7 +333,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/at-least/community.json b/docs/example-api/tier/at-least/community.json index 092264f..557e2f1 100644 --- a/docs/example-api/tier/at-least/community.json +++ b/docs/example-api/tier/at-least/community.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/at-least/official-catalog.json b/docs/example-api/tier/at-least/official-catalog.json index 8127aef..b872fb5 100644 --- a/docs/example-api/tier/at-least/official-catalog.json +++ b/docs/example-api/tier/at-least/official-catalog.json @@ -294,7 +294,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/at-least/official.json b/docs/example-api/tier/at-least/official.json index 8e5a354..be76f59 100644 --- a/docs/example-api/tier/at-least/official.json +++ b/docs/example-api/tier/at-least/official.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/at-least/partner-catalog.json b/docs/example-api/tier/at-least/partner-catalog.json index 8127aef..b872fb5 100644 --- a/docs/example-api/tier/at-least/partner-catalog.json +++ b/docs/example-api/tier/at-least/partner-catalog.json @@ -294,7 +294,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/at-least/partner.json b/docs/example-api/tier/at-least/partner.json index 8e5a354..be76f59 100644 --- a/docs/example-api/tier/at-least/partner.json +++ b/docs/example-api/tier/at-least/partner.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/community-metrics.json b/docs/example-api/tier/community-metrics.json index aab038d..5fbcab3 100644 --- a/docs/example-api/tier/community-metrics.json +++ b/docs/example-api/tier/community-metrics.json @@ -1,10 +1,10 @@ { - "registry_category_misc_count": 1, - "registry_extension_count": 1, - "registry_grade_c_count": 1, - "registry_issue_smoke_count": 1, - "registry_issue_types_count": 1, - "registry_product_oss_count": 1, - "registry_tier_community_count": 1, - "registry_type_javascript_count": 1 + "category_misc_count": 1, + "extension_count": 1, + "grade_c_count": 1, + "issue_smoke_count": 1, + "issue_types_count": 1, + "product_oss_count": 1, + "tier_community_count": 1, + "type_javascript_count": 1 } diff --git a/docs/example-api/tier/community-metrics.txt b/docs/example-api/tier/community-metrics.txt deleted file mode 100644 index b038a84..0000000 --- a/docs/example-api/tier/community-metrics.txt +++ /dev/null @@ -1,24 +0,0 @@ -# HELP registry_extension_count The total number of extensions. -# TYPE registry_extension_count counter -registry_extension_count 1 1733945081492 -# HELP registry_grade_c_count Number of C-grade extensions. -# TYPE registry_grade_c_count counter -registry_grade_c_count 1 1733945081492 -# HELP registry_issue_smoke_count Number of extensions without smoke test script. -# TYPE registry_issue_smoke_count counter -registry_issue_smoke_count 1 1733945081492 -# HELP registry_issue_types_count Number of extensions without API declaration file. -# TYPE registry_issue_types_count counter -registry_issue_types_count 1 1733945081492 -# HELP registry_product_oss_count Number of extensions available in Grafana k6. -# TYPE registry_product_oss_count counter -registry_product_oss_count 1 1733945081492 -# HELP registry_tier_community_count Number of extension in the community' tier. -# TYPE registry_tier_community_count counter -registry_tier_community_count 1 1733945081492 -# HELP registry_type_javascript_count Number of JavaScript extension. -# TYPE registry_type_javascript_count counter -registry_type_javascript_count 1 1733945081492 -# HELP registry_category_misc_count Number of extensions in the 'misc' category. -# TYPE registry_category_misc_count counter -registry_category_misc_count 1 1733945081492 diff --git a/docs/example-api/tier/official-catalog.json b/docs/example-api/tier/official-catalog.json index 8127aef..b872fb5 100644 --- a/docs/example-api/tier/official-catalog.json +++ b/docs/example-api/tier/official-catalog.json @@ -294,7 +294,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/official-metrics.json b/docs/example-api/tier/official-metrics.json index c3cad19..298d4b5 100644 --- a/docs/example-api/tier/official-metrics.json +++ b/docs/example-api/tier/official-metrics.json @@ -1,18 +1,18 @@ { - "registry_category_data_count": 2, - "registry_category_kubernetes_count": 1, - "registry_category_observability_count": 1, - "registry_category_reporting_count": 1, - "registry_extension_count": 4, - "registry_grade_a_count": 1, - "registry_grade_b_count": 2, - "registry_grade_c_count": 1, - "registry_issue_examples_count": 1, - "registry_issue_smoke_count": 3, - "registry_issue_types_count": 1, - "registry_product_cloud_count": 1, - "registry_product_oss_count": 4, - "registry_tier_official_count": 4, - "registry_type_javascript_count": 3, - "registry_type_output_count": 1 + "category_data_count": 2, + "category_kubernetes_count": 1, + "category_observability_count": 1, + "category_reporting_count": 1, + "extension_count": 4, + "grade_a_count": 1, + "grade_b_count": 2, + "grade_c_count": 1, + "issue_examples_count": 1, + "issue_smoke_count": 3, + "issue_types_count": 1, + "product_cloud_count": 1, + "product_oss_count": 4, + "tier_official_count": 4, + "type_javascript_count": 3, + "type_output_count": 1 } diff --git a/docs/example-api/tier/official-metrics.txt b/docs/example-api/tier/official-metrics.txt deleted file mode 100644 index 46a0aac..0000000 --- a/docs/example-api/tier/official-metrics.txt +++ /dev/null @@ -1,48 +0,0 @@ -# HELP registry_type_output_count Number of Output extension. -# TYPE registry_type_output_count counter -registry_type_output_count 1 1733945081492 -# HELP registry_category_data_count Number of extensions in the 'data' category. -# TYPE registry_category_data_count counter -registry_category_data_count 2 1733945081492 -# HELP registry_category_kubernetes_count Number of extensions in the 'kubernetes' category. -# TYPE registry_category_kubernetes_count counter -registry_category_kubernetes_count 1 1733945081492 -# HELP registry_extension_count The total number of extensions. -# TYPE registry_extension_count counter -registry_extension_count 4 1733945081492 -# HELP registry_grade_a_count Number of A-grade extensions. -# TYPE registry_grade_a_count counter -registry_grade_a_count 1 1733945081492 -# HELP registry_issue_types_count Number of extensions without API declaration file. -# TYPE registry_issue_types_count counter -registry_issue_types_count 1 1733945081492 -# HELP registry_tier_official_count Number of extensions in the 'official' tier. -# TYPE registry_tier_official_count counter -registry_tier_official_count 4 1733945081492 -# HELP registry_grade_b_count Number of B-grade extensions. -# TYPE registry_grade_b_count counter -registry_grade_b_count 2 1733945081492 -# HELP registry_product_oss_count Number of extensions available in Grafana k6. -# TYPE registry_product_oss_count counter -registry_product_oss_count 4 1733945081492 -# HELP registry_category_observability_count Number of extensions in the 'observability' category. -# TYPE registry_category_observability_count counter -registry_category_observability_count 1 1733945081492 -# HELP registry_grade_c_count Number of C-grade extensions. -# TYPE registry_grade_c_count counter -registry_grade_c_count 1 1733945081492 -# HELP registry_issue_smoke_count Number of extensions without smoke test script. -# TYPE registry_issue_smoke_count counter -registry_issue_smoke_count 3 1733945081492 -# HELP registry_category_reporting_count Number of extensions in the 'reporting' category. -# TYPE registry_category_reporting_count counter -registry_category_reporting_count 1 1733945081492 -# HELP registry_issue_examples_count Number of extensions without examples directory. -# TYPE registry_issue_examples_count counter -registry_issue_examples_count 1 1733945081492 -# HELP registry_product_cloud_count Number of extensions available in Grafana Cloud k6. -# TYPE registry_product_cloud_count counter -registry_product_cloud_count 1 1733945081492 -# HELP registry_type_javascript_count Number of JavaScript extension. -# TYPE registry_type_javascript_count counter -registry_type_javascript_count 3 1733945081492 diff --git a/docs/example-api/tier/official.json b/docs/example-api/tier/official.json index 8e5a354..be76f59 100644 --- a/docs/example-api/tier/official.json +++ b/docs/example-api/tier/official.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example-api/tier/partner-metrics.txt b/docs/example-api/tier/partner-metrics.txt deleted file mode 100644 index e69de29..0000000 diff --git a/docs/example-catalog.json b/docs/example-catalog.json index 4b24aae..7e41083 100644 --- a/docs/example-catalog.json +++ b/docs/example-catalog.json @@ -333,7 +333,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ], diff --git a/docs/example.json b/docs/example.json index 092264f..557e2f1 100644 --- a/docs/example.json +++ b/docs/example.json @@ -215,7 +215,7 @@ "owner": "grafana", "public": true, "stars": 63, - "timestamp": 1733730893, + "timestamp": 1733979175, "topics": [ "xk6" ],