-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
confgenerator: add resource_name label using modify fields. (#544)
* add resource_name label using hostName value. * add integration test to verify resource_name. * Update goldens.
- Loading branch information
1 parent
ef00525
commit b653dab
Showing
592 changed files
with
6,745 additions
and
3,006 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
...l-backward_compatible_with_explicit_exporters/golden_10fdedaf5448c4114b7b329139f093fc.lua
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...l-backward_compatible_with_explicit_exporters/golden_8f841e1624ad9de1bb98322777b1ac10.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] | ||
end)(); | ||
local __field_1 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
local v = __field_0; | ||
if v == nil then v = "" end; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "syslog" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
...ator/testdata/valid/linux/all-built_in_config/golden_10fdedaf5448c4114b7b329139f093fc.lua
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...ator/testdata/valid/linux/all-built_in_config/golden_8f841e1624ad9de1bb98322777b1ac10.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] | ||
end)(); | ||
local __field_1 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
local v = __field_0; | ||
if v == nil then v = "" end; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "syslog" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
...data/valid/linux/all-user_config_file_deleted/golden_10fdedaf5448c4114b7b329139f093fc.lua
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...data/valid/linux/all-user_config_file_deleted/golden_8f841e1624ad9de1bb98322777b1ac10.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] | ||
end)(); | ||
local __field_1 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
local v = __field_0; | ||
if v == nil then v = "" end; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "syslog" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
...testdata/valid/linux/logging-custom_log_level/golden_10fdedaf5448c4114b7b329139f093fc.lua
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...testdata/valid/linux/logging-custom_log_level/golden_8f841e1624ad9de1bb98322777b1ac10.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] | ||
end)(); | ||
local __field_1 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
local v = __field_0; | ||
if v == nil then v = "" end; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "syslog" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...lid/linux/logging-pipeline_multiple_pipelines/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] | ||
end)(); | ||
local __field_1 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
local v = __field_0; | ||
if v == nil then v = "" end; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "test_syslog_source_id_tcp" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
28 changes: 28 additions & 0 deletions
28
...lid/linux/logging-pipeline_multiple_pipelines/golden_13322ed6829712e9e8004b6705b58020.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] | ||
end)(); | ||
local __field_1 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
local v = __field_0; | ||
if v == nil then v = "" end; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "log_source_id2" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
12 changes: 0 additions & 12 deletions
12
...lid/linux/logging-pipeline_multiple_pipelines/golden_15cf604ba57275339813be7a240be374.lua
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...lid/linux/logging-pipeline_multiple_pipelines/golden_a8d53383411830cfac4f0703a037ce13.lua
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...lid/linux/logging-pipeline_multiple_pipelines/golden_bbe493b54b165ca3149fd2168216ea97.lua
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...lid/linux/logging-pipeline_multiple_pipelines/golden_c540c13717430f9798e74730652c5612.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] | ||
end)(); | ||
local __field_1 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
local v = __field_0; | ||
if v == nil then v = "" end; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "test_syslog_source_id_udp" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
12 changes: 0 additions & 12 deletions
12
...lid/linux/logging-pipeline_multiple_pipelines/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...lid/linux/logging-pipeline_multiple_pipelines/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] | ||
end)(); | ||
local __field_1 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
local v = __field_0; | ||
if v == nil then v = "" end; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "log_source_id1" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
Oops, something went wrong.