Skip to content

Commit

Permalink
update v2 schema configmap (#1175)
Browse files Browse the repository at this point in the history
Co-authored-by: Amol Agrawal <[email protected]>
  • Loading branch information
pfrcks and Amol Agrawal authored Feb 28, 2024
1 parent 0c4daab commit 61e51b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 0 additions & 5 deletions build/common/installer/scripts/tomlparser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,6 @@ def populateSettingValuesFromConfigMap(parsedConfig)
@logEnableMultiline = parsedConfig[:log_collection_settings][:enable_multiline_logs][:enabled]
puts "config::Using config map setting for multiline logging"

if @containerLogSchemaVersion.strip.casecmp("v2") != 0
puts "config:: WARN: container logs V2 is disabled and is required for multiline logging. Disabling multiline logging"
@logEnableMultiline = "false"
end

multilineLanguages = parsedConfig[:log_collection_settings][:enable_multiline_logs][:stacktrace_languages]
if !multilineLanguages.nil?
if multilineLanguages.kind_of?(Array)
Expand Down
9 changes: 5 additions & 4 deletions kubernetes/container-azm-ms-agentconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ data:
# When the setting is set to false, only the kube events with !normal event type will be collected
enabled = false
# When this is enabled (enabled = true), all kube events including normal events will be collected
#[log_collection_settings.schema]
# In the absence of this configmap, default value for containerlog_schema_version is "v1"
[log_collection_settings.schema]
# In the absence of this configmap, default value for containerlog_schema_version is "v1" if "v2" is not enabled while onboarding
# Supported values for this setting are "v1","v2"
# See documentation at https://aka.ms/ContainerLogv2 for benefits of v2 schema over v1 schema before opting for "v2" schema
# containerlog_schema_version = "v2"
# See documentation at https://aka.ms/ContainerLogv2 for benefits of v2 schema over v1 schema
containerlog_schema_version = "v2"
#[log_collection_settings.enable_multiline_logs]
# fluent-bit based multiline log collection for .NET, Go, Java, and Python stacktraces. Update stacktrace_languages to specificy which languages to collect stacktraces for(valid inputs: "go", "java", "python", "dotnet").
# NOTE: for better performance consider enabling only for languages that are needed. Dotnet is experimental and may not work in all cases.
# If enabled will also stitch together container logs split by docker/cri due to size limits(16KB per log line) up to 64 KB.
# Requires ContainerLogV2 schema to be enabled. See https://aka.ms/ContainerLogv2 for more details.
# enabled = "false"
# stacktrace_languages = []
Expand Down

0 comments on commit 61e51b4

Please sign in to comment.