Skip to content

Commit 6a8859c

Browse files
authored
fix: Correct an issue on observability configuration for Prometheus (#4)
Signed-off-by: Jeremy HERGAULT <jeremy.hergault@worldline.com>
1 parent ee7fa32 commit 6a8859c

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "worldline-prosa",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"author": "Worldline",
55
"summary": "Installs, configures, and manages ProSA.",
66
"tags": ["worldline", "prosa", "transactional", "payments"],

spec/acceptance/processors_spec.rb

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,26 @@
1616

1717
pp = <<-MANIFEST
1818
class { 'prosa':
19-
prosa_name => #{prosa_hash['prosa_name']},
20-
service_manage => false,
19+
prosa_name => #{prosa_hash['prosa_name']},
20+
service_manage => false,
21+
telemetry_level => 'warn',
22+
observability => {
23+
'metrics' => {
24+
'prometheus' => {
25+
'endpoint' => '0.0.0.0:9090',
26+
},
27+
},
28+
'traces' => {
29+
'stdout' => {
30+
'level' => 'info',
31+
},
32+
},
33+
'logs' => {
34+
'stdout' => {
35+
'level' => 'info',
36+
},
37+
},
38+
},
2139
}
2240
class { 'prosa::processors':
2341
processors => {
@@ -50,6 +68,11 @@ class { 'prosa::processors':
5068
apply_manifest(pp, catch_failures: true)
5169
end
5270

71+
describe file("#{prosa_hash['conf_dir']}/prosa.yml") do
72+
it { is_expected.to contain 'name: prosa-acceptance' }
73+
it { is_expected.to contain ' prometheus:' }
74+
end
75+
5376
describe file("#{prosa_hash['conf_dir']}/stub-1.yml") do
5477
it { is_expected.to contain ' service_names:' }
5578
end

templates/prosa.yml.epp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ observability:
1212
<%= $telemetry_type %>:
1313
<%- $observability[$telemetry_type].keys.each |$param| { -%>
1414
<%- if $param == 'otlp' or $param == 'prometheus' { -%>
15-
otlp:
15+
<%= $param %>:
1616
<%- $observability[$telemetry_type][$param].keys.each |$val| { -%>
1717
<%= $val %>: <%= $observability[$telemetry_type][$param][$val] %>
1818
<%- } -%>

0 commit comments

Comments
 (0)