Skip to content

Conversation

@fitbeard
Copy link
Contributor

No description provided.

Signed-off-by: Tadas Sutkaitis <[email protected]>
Signed-off-by: Tadas Sutkaitis <[email protected]>
Signed-off-by: Tadas Sutkaitis <[email protected]>
Signed-off-by: Tadas Sutkaitis <[email protected]>
@fitbeard fitbeard requested a review from mnaser October 28, 2025 11:50
Signed-off-by: Tadas Sutkaitis <[email protected]>
Signed-off-by: Tadas Sutkaitis <[email protected]>
Signed-off-by: Tadas Sutkaitis <[email protected]>
Signed-off-by: Tadas Sutkaitis <[email protected]>
Signed-off-by: Tadas Sutkaitis <[email protected]>
Signed-off-by: Tadas Sutkaitis <[email protected]>
Copy link
Member

@mnaser mnaser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

round 1, can you do the splits for the resources like the other ones please?

Comment on lines +41 to +42
openstack_glance_image_bytes{id="1bea47ed-f6a9-463b-b423-14b9cca9ad27",name="cirros-0.3.2-x86_64-disk",tenant_id="5ef70662f8b34079a6eddb8da9d75fe8"} 1.3167616e+07
openstack_glance_image_bytes{id="781b3762-9469-4cec-b58d-3349e5de4e9c",name="F17-x86_64-cfntools",tenant_id="5ef70662f8b34079a6eddb8da9d75fe8"} 4.76704768e+08
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think upstream tests have these flipped, I've wanted to try and keep them identical. Would it work to flip them?

Comment on lines +26 to +32
-- name: GetImageCount :one
SELECT
COUNT(*) as count
FROM
images
WHERE
deleted = 0; No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This query is neve used, so let's remove/drop it :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you "massage" this to be similar to the other ones like how it has no keys and constraints and the primary key is on the field itself?

}

for _, image := range images {
// Convert size from nullable int64 to float64, defaulting to 0 if null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can drop this comment, it's pretty clear :)

keystonedb "github.com/vexxhost/openstack_database_exporter/internal/db/keystone"
)

const Subsystem = "identity"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this to keystone.go?

Comment on lines +42 to +63
groupsDesc = prometheus.NewDesc(
prometheus.BuildFQName(collector.Namespace, Subsystem, "groups"),
"groups",
nil,
nil,
)

projectInfoDesc = prometheus.NewDesc(
prometheus.BuildFQName(collector.Namespace, Subsystem, "project_info"),
"project_info",
[]string{
"description",
"domain_id",
"enabled",
"id",
"is_domain",
"name",
"parent_id",
"tags",
},
nil,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

groups.go

Comment on lines +65 to +70
projectsDesc = prometheus.NewDesc(
prometheus.BuildFQName(collector.Namespace, Subsystem, "projects"),
"projects",
nil,
nil,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

projects.go

Comment on lines +72 to +77
regionsDesc = prometheus.NewDesc(
prometheus.BuildFQName(collector.Namespace, Subsystem, "regions"),
"regions",
nil,
nil,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regions.go

Comment on lines +79 to +84
usersDesc = prometheus.NewDesc(
prometheus.BuildFQName(collector.Namespace, Subsystem, "users"),
"users",
nil,
nil,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

users.go

func NewIdentityCollector(db *sql.DB, logger *slog.Logger) *IdentityCollector {
return &IdentityCollector{
db: db,
logger: logger,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

queries can live here so you dont have to call every function with it

@fitbeard
Copy link
Contributor Author

fitbeard commented Nov 5, 2025

@mnaser I splitted everything to separate PRs + added some changes.

@mnaser mnaser closed this Dec 11, 2025
@mnaser mnaser deleted the feat/add_more_services branch December 11, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants