Skip to content

Commit a73168c

Browse files
committed
Workaround for incident.Id or incident.ID
see PagerDuty/go-pagerduty#218 Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent e1c4321 commit a73168c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

exporter.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ func (e *PagerdutyElasticsearchExporter) runScrape() {
212212
}
213213

214214
for _, incident := range incidentResponse.Incidents {
215+
// workaround for https://github.com/PagerDuty/go-pagerduty/issues/218
216+
if incident.Id == "" {
217+
incident.Id = incident.ID
218+
}
219+
215220
daemonLogger.Verbosef(" - Incident %v", incident.Id)
216221
e.indexIncident(incident, esIndexRequestChannel)
217222

0 commit comments

Comments
 (0)