-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ingest Dataproc GCE instance metadata attributes as logging labels. (#…
…1541) Co-authored-by: Quentin Smith <[email protected]> Adds default ingestion of Dataproc-specific GCE instance metadata attributes as logging labels, namely: - dataproc-cluster-name - dataproc-cluster-uuid - dataproc-region
- Loading branch information
1 parent
4e0c2bb
commit c568f4f
Showing
19 changed files
with
1,120 additions
and
58 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
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
28 changes: 28 additions & 0 deletions
28
...rator/testdata/goldens/builtin/golden/linux-dataproc/3c47867f5b9bfc4409551ecdaaac4562.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 v = "test-cluster"; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/attributes/dataproc-cluster-name"] = value | ||
end)(v) | ||
local v = "test-uuid"; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/attributes/dataproc-cluster-uuid"] = value | ||
end)(v) | ||
local v = "test-region"; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["compute.googleapis.com/attributes/dataproc-region"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
Oops, something went wrong.