feat: allow specifying a custom app label alias when shipping logs via vector

Closes #7354
This commit is contained in:
Jose Diaz-Gonzalez committed 2025-01-03 23:38:20 -05:00
1 parent 60eab73c17
commit 869f9a0346
7 files changed
+146 -16

No files matched your search

+2 -2
View File
@@ -257,7 +257,7 @@ func writeVectorConfig() error {
data.Sources[fmt.Sprintf("docker-source:%s", inflectedAppName)] = vectorSource{
Type: "docker_logs",
IncludeLabels: []string{fmt.Sprintf("com.dokku.app-name=%s", appName)},
IncludeLabels: []string{fmt.Sprintf("%s=%s", reportComputedAppLabelAlias(appName), appName)},
}
data.Sinks[fmt.Sprintf("docker-sink:%s", inflectedAppName)] = sink
@@ -272,7 +272,7 @@ func writeVectorConfig() error {
data.Sources["docker-global-source"] = vectorSource{
Type: "docker_logs",
IncludeLabels: []string{"com.dokku.app-name"},
IncludeLabels: []string{reportGlobalAppLabelAlias("global")},
}
data.Sinks["docker-global-sink"] = sink