Skip to content

Commit

Permalink
v1.1.38
Browse files Browse the repository at this point in the history
Bug fix/hardcoded version
  • Loading branch information
8naama authored Aug 11, 2024
2 parents 5c49655 + 474eacd commit 56fb4d8
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,11 @@ function Add-LogsProcessorsToOtelConfig {

return $ExitCode
}

if ($ProcessorName -eq 'resource/agent') {
$local:AgentVersion = Get-Content "$env:TEMP\Logzio\version"
$Err = Add-YamlFileFieldValue "$script:OtelResourcesDir\$script:OtelConfigName" '.processors.resource/agent.attributes[0].value' $AgentVersion
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ function Add-MetricsProcessorsToOtelConfig {

return $ExitCode
}

if ($ProcessorName -eq 'resource/agent') {
$local:AgentVersion = Get-Content "$env:TEMP\Logzio\version"
$Err = Add-YamlFileFieldValue "$script:OtelResourcesDir\$script:OtelConfigName" '.processors.resource/agent.attributes[0].value' $AgentVersion
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions resources-linux/otel/datasource_logs_utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ function add_logs_processors_to_otel_config {

return $EXIT_CODE
fi

if [[ $processor_name == 'resource/agent' ]] ; then
AGENT_VERSION=$(cat '/tmp/logzio/version')
add_yaml_file_field_value "$OTEL_RESOURCES_DIR/$OTEL_CONFIG_NAME" '.processors.resource/agent.attributes[0].value' "$AGENT_VERSION"
fi
done
}

Expand Down
5 changes: 5 additions & 0 deletions resources-linux/otel/datasource_metrics_utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ function add_metrics_processors_to_otel_config {

return $EXIT_CODE
fi

if [[ $processor_name == 'resource/agent' ]] ; then
AGENT_VERSION=$(cat '/tmp/logzio/version')
add_yaml_file_field_value "$OTEL_RESOURCES_DIR/$OTEL_CONFIG_NAME" '.processors.resource/agent.attributes[0].value' "$AGENT_VERSION"
fi
done
}

Expand Down
5 changes: 5 additions & 0 deletions resources-mac/otel/datasource_logs_utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ function add_logs_processors_to_otel_config {

return $EXIT_CODE
fi

if [[ $processor_name == 'resource/agent' ]] ; then
AGENT_VERSION=$(cat '/tmp/logzio/version')
add_yaml_file_field_value "$OTEL_RESOURCES_DIR/$OTEL_CONFIG_NAME" '.processors.resource/agent.attributes[0].value' "$AGENT_VERSION"
fi
done
}

Expand Down
5 changes: 5 additions & 0 deletions resources-mac/otel/datasource_metrics_utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ function add_metrics_processors_to_otel_config {

return $EXIT_CODE
fi

if [[ $processor_name == 'resource/agent' ]] ; then
AGENT_VERSION=$(cat '/tmp/logzio/version')
add_yaml_file_field_value "$OTEL_RESOURCES_DIR/$OTEL_CONFIG_NAME" '.processors.resource/agent.attributes[0].value' "$AGENT_VERSION"
fi
done
}

Expand Down
2 changes: 1 addition & 1 deletion resources/otel/processors/resource_agent.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource/agent:
attributes:
- key: logzio_agent_version
value: v1.1.34
value:
action: upsert

0 comments on commit 56fb4d8

Please sign in to comment.