-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logging labels with GCE instance's managed instance group. (#1849)
Co-authored-by: Francisco Valente <1435136+franciscovalentecastro@users.noreply.github.com>
- Loading branch information
1 parent
6602f6c
commit b0665b3
Showing
3,140 changed files
with
92,157 additions
and
52,608 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
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
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
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
74 changes: 74 additions & 0 deletions
74
..._compatible_with_explicit_exporters/golden/linux-gpu/adea349dc2d92cd07daa1d7847f5e96a.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,74 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
return record["agent.googleapis.com/log_file_path"] | ||
end)(); | ||
local __field_1 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/instance_group_manager/name"] | ||
end)(); | ||
local __field_2 = (function() | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
return nil | ||
end | ||
return record["logging.googleapis.com/labels"]["compute.googleapis.com/instance_group_manager/zone"] | ||
end)(); | ||
local __field_3 = (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_4 = (function() | ||
return record["logging.googleapis.com/logName"] | ||
end)(); | ||
(function(value) | ||
record["agent.googleapis.com/log_file_path"] = value | ||
end)(nil); | ||
local v = __field_0; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["agent.googleapis.com/log_file_path"] = value | ||
end)(v) | ||
local v = __field_1; | ||
if v == nil then v = "test-mig" 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/instance_group_manager/name"] = value | ||
end)(v) | ||
local v = __field_2; | ||
if v == nil then v = "test-zone" 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/instance_group_manager/zone"] = value | ||
end)(v) | ||
local v = __field_3; | ||
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_4; | ||
if v == nil then v = "syslog" end; | ||
(function(value) | ||
record["logging.googleapis.com/logName"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
Oops, something went wrong.