Skip to content

feat: add observability labels#73

Merged
reneca merged 3 commits intomainfrom
prom_labels
Apr 28, 2026
Merged

feat: add observability labels#73
reneca merged 3 commits intomainfrom
prom_labels

Conversation

@reneca
Copy link
Copy Markdown
Contributor

@reneca reneca commented Apr 13, 2026

Following tests on Grafana Cloud, metrics are not perfect regarding labels.
From service semantic conventions we should have service.instance.id, service.namespace, service.name.
This triplet MUST be globally unique, so this change add these missing labels to have a job and instance on Grafana Cloud metrics.

Signed-off-by: Jeremy HERGAULT <jeremy.hergault@worldline.com>
@reneca reneca requested review from Timmy80 and oschijns April 13, 2026 13:20
@reneca reneca self-assigned this Apr 13, 2026
@reneca reneca added the enhancement New feature or request label Apr 13, 2026
reneca and others added 2 commits April 14, 2026 09:43
Signed-off-by: Jeremy HERGAULT <jeremy.hergault@worldline.com>
Signed-off-by: Jeremy HERGAULT <jeremy@hergault.fr>
Copy link
Copy Markdown
Contributor

@oschijns oschijns left a comment

Choose a reason for hiding this comment

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

I cannot test it yet.
Overall looks fine, but the pipeline failed.
(Looks like an unrelated issue.)

@reneca
Copy link
Copy Markdown
Contributor Author

reneca commented Apr 28, 2026

For Windows we could include:

#[cfg(target_os = "windows")]
if let Ok(output) = Command::new("reg")
    .args(["query", r"HKLM\SOFTWARE\Microsoft\Cryptography", "/v", "MachineGuid"])
    .output()
    && output.status.success()
    && let Ok(output_str) = String::from_utf8(output.stdout)
{
    for line in output_str.lines() {
        if line.contains("MachineGuid")
            && let Some(value) = line.split_whitespace().last()
            && let Ok(machine_uuid) = Uuid::parse_str(value.trim())
        {
            return machine_uuid.to_string();
        }
    }
}

But the compilation is a mess, so don't need to include it yet.

@reneca reneca merged commit 9b69847 into main Apr 28, 2026
6 of 7 checks passed
@reneca reneca deleted the prom_labels branch April 28, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants