Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ timespan
timestamped
tzdata
ubuntu
upstreaminfo
useragents
usergroups
userguide
Expand Down
49 changes: 25 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ members = [
"vdev",
]

[workspace.dependencies]
vrl = { version = "0.5.0", features = ["cli", "test", "test_framework", "arbitrary"] }

[dependencies]
vrl.workspace = true

# Internal libs
codecs = { path = "lib/codecs", default-features = false }
dnsmsg-parser = { path = "lib/dnsmsg-parser", optional = true }
Expand Down Expand Up @@ -227,9 +232,6 @@ tui = { version = "0.19.0", optional = true, default-features = false, features
hex = { version = "0.4.3", default-features = false, optional = true }
sha2 = { version = "0.10.7", default-features = false, optional = true }

# VRL Lang
vrl = { package = "vrl", version = "0.4.0", features = ["cli", "test"] }

# External libs
arc-swap = { version = "1.6", default-features = false, optional = true }
async-compression = { version = "0.4.0", default-features = false, features = ["tokio", "gzip", "zstd"], optional = true }
Expand Down
2 changes: 1 addition & 1 deletion lib/codecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ snafu = { version = "0.7.4", default-features = false, features = ["futures"] }
syslog_loose = { version = "0.18", default-features = false, optional = true }
tokio-util = { version = "0.7", default-features = false, features = ["codec"] }
tracing = { version = "0.1", default-features = false }
vrl = { version = "0.4.0", default-features = false, features = ["value"] }
vrl.workspace = true
vector-common = { path = "../vector-common", default-features = false }
vector-config = { path = "../vector-config", default-features = false }
vector-config-common = { path = "../vector-config-common", default-features = false }
Expand Down
5 changes: 1 addition & 4 deletions lib/enrichment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@ publish = false
arc-swap = { version = "1.6.0", default-features = false }
chrono = { version = "0.4.19", default-features = false }
dyn-clone = { version = "1.0.11", default-features = false }
vrl = { version = "0.4.0", default-features = false, features = [
"compiler",
"diagnostic",
] }
vrl.workspace = true
2 changes: 1 addition & 1 deletion lib/opentelemetry-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ lookup = { package = "vector-lookup", path = "../vector-lookup", default-feature
ordered-float = { version = "3.7.0", default-features = false }
prost = { version = "0.11", default-features = false, features = ["std"] }
tonic = { version = "0.9", default-features = false, features = ["codegen", "gzip", "prost", "tls", "tls-roots", "transport"] }
vrl = { version = "0.4.0", default-features = false, features = ["value"] }
vrl.workspace = true
vector-core = { path = "../vector-core", default-features = false }
2 changes: 1 addition & 1 deletion lib/vector-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ snafu = { version = "0.7", optional = true }
stream-cancel = { version = "0.8.1", default-features = false }
tokio = { version = "1.28.2", default-features = false, features = ["macros", "time"] }
tracing = { version = "0.1.34", default-features = false }
vrl = { version = "0.4.0", default-features = false, features = ["value", "core", "compiler"] }
vrl.workspace = true
vector-config = { path = "../vector-config" }
vector-config-common = { path = "../vector-config-common" }
vector-config-macros = { path = "../vector-config-macros" }
Expand Down
2 changes: 1 addition & 1 deletion lib/vector-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ snafu = { version = "0.7.4", default-features = false }
toml = { version = "0.7.5", default-features = false }
tracing = { version = "0.1.34", default-features = false }
url = { version = "2.4.0", default-features = false, features = ["serde"] }
vrl = { version = "0.4.0", default-features = false, features = ["compiler"] }
vrl.workspace = true
vector-config-common = { path = "../vector-config-common" }
vector-config-macros = { path = "../vector-config-macros" }

Expand Down
4 changes: 2 additions & 2 deletions lib/vector-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ vector-common = { path = "../vector-common" }
vector-config = { path = "../vector-config" }
vector-config-common = { path = "../vector-config-common" }
vector-config-macros = { path = "../vector-config-macros" }
vrl = { version = "0.4.0" }
vrl.workspace = true

[target.'cfg(target_os = "macos")'.dependencies]
security-framework = "2.9.1"
Expand Down Expand Up @@ -94,7 +94,7 @@ rand = "0.8.5"
rand_distr = "0.4.3"
tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt", "ansi", "registry"] }
vector-common = { path = "../vector-common", default-features = false, features = ["test"] }
vrl = { version = "0.4.0", default-features = false, features = ["value", "arbitrary", "lua"] }
vrl.workspace = true

[features]
api = ["dep:async-graphql"]
Expand Down
2 changes: 1 addition & 1 deletion lib/vector-lookup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ license = "MPL-2.0"
serde = { version = "1.0.164", default-features = false, features = ["derive", "alloc"] }
vector-config = { path = "../vector-config" }
vector-config-macros = { path = "../vector-config-macros" }
vrl = { version = "0.4.0", default-features = false, features = ["path"] }
vrl.workspace = true
2 changes: 1 addition & 1 deletion lib/vector-vrl/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ license = "MPL-2.0"
[dependencies]
clap = { version = "4.1.14", features = ["derive"] }
vector-vrl-functions = { path = "../functions" }
vrl = { version = "0.4.0", default-features = false, features = ["stdlib", "cli"] }
vrl.workspace = true
2 changes: 1 addition & 1 deletion lib/vector-vrl/functions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ publish = false
license = "MPL-2.0"

[dependencies]
vrl = { version = "0.4.0", default-features = false, features = ["compiler", "path", "diagnostic"] }
vrl.workspace = true
2 changes: 1 addition & 1 deletion lib/vector-vrl/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish = false

[dependencies]
enrichment = { path = "../../enrichment" }
vrl = { version = "0.4.0", features = ["test_framework"]}
vrl.workspace = true
vector-vrl-functions = { path = "../../vector-vrl/functions" }

ansi_term = "0.12"
Expand Down
2 changes: 1 addition & 1 deletion lib/vector-vrl/web-playground/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = "0.2"
vrl = { version = "0.4.0", default-features = false, features = ["value", "stdlib"] }
vrl.workspace = true
serde = { version = "1.0", features = ["derive"] }
serde-wasm-bindgen = "0.5"
gloo-utils = { version = "0.1", features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/remap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ impl TransformConfig for RemapConfig {
.compile_vrl_program(enrichment_tables, merged_definition)
.map(|(program, _, _, external_context)| {
(
program.final_type_state(),
program.final_type_info().state,
external_context
.get_custom::<MeaningList>()
.cloned()
Expand Down
6 changes: 6 additions & 0 deletions website/cue/reference/remap/functions/format_timestamp.cue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ remap: functions: format_timestamp: {
required: true
type: ["string"]
},
{
name: "timezone"
description: "The timezone to use when formatting the timestamp. The uses the TZ identifier, or 'local'"
required: false
type: ["string"]
},
]
internal_failure_reasons: []
return: types: ["string"]
Expand Down
58 changes: 58 additions & 0 deletions website/cue/reference/remap/functions/from_unix_timestamp.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package metadata

remap: functions: from_unix_timestamp: {
category: "Convert"
description: """
Converts the `value` integer from a [Unix timestamp](\(urls.unix_timestamp)) to a VRL `timestamp`.

Converts from the number of seconds since the Unix epoch by default, but milliseconds or nanoseconds can also be
specified by `unit`.
"""

arguments: [
{
name: "value"
description: "The Unix timestamp to convert."
required: true
type: ["integer"]
},
{
name: "unit"
description: "The time unit."
type: ["string"]
required: false
enum: {
seconds: "Express Unix time in seconds"
milliseconds: "Express Unix time in milliseconds"
nanoseconds: "Express Unix time in nanoseconds"
}
default: "seconds"
},
]
internal_failure_reasons: []
return: types: ["timestamp"]

examples: [
{
title: "Convert from a Unix timestamp (seconds)"
source: #"""
from_unix_timestamp!(5)
"""#
return: "1970-01-01T00:00:05Z"
},
{
title: "Convert from a Unix timestamp (milliseconds)"
source: #"""
from_unix_timestamp(5000, unit: "milliseconds")
"""#
return: "1970-01-01T00:00:05Z"
},
{
title: "Convert from a Unix timestamp (nanoseconds)"
source: #"""
from_unix_timestamp(5000, unit: "nanoseconds")
"""#
return: "1970-01-01T00:00:00.000005Z"
},
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ remap: functions: parse_nginx_log: {
enum: {
"combined": "Nginx combined format"
"error": "Default Nginx error format"
"ingress_upstreaminfo": "Provides detailed upstream information (Nginx Ingress Controller)"
Comment thread Fixed
}
type: ["string"]
},
Expand Down