
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@rbxts-trail/core
Advanced tools
Event-based diagnostic information inspired from
tokio-rs/tracing
[!CAUTION] This project is in experimental phase. We advise you to not use this in your production projects. Bugs and unexpecteds output with these modules will occur at any time.
If you wish to do so, PLEASE USE IT AT YOUR OWN RISK!
import { Event, Level, Span, Subscriber, fields, info } from "@rbxts-trail/core";
import { Layer, LayerContext, Layers } from "@rbxts-trail/subscriber";
import { LookupSpan, Registry, SpanData } from "@rbxts-trail/subscriber";
type RegistrySubscriber = Subscriber & LookupSpan<SpanData>;
class FmtLayer extends Layer<RegistrySubscriber> {
public onEvent(event: Event, ctx: LayerContext<RegistrySubscriber>): void {
const timestamp = DateTime.now()
.FormatLocalTime("YYYY-MM-DDTHH:MM:SSZ", "en-us");
event.metadata.fields.push("timestamp");
event.fields.push(timestamp);
const levelStr = Level[event.metadata.level].lower();
print(`[${timestamp}] [${levelStr}] ${event.fields[0]}`);
}
}
const subscriber = new Layers(new Registry())
.withLayer(new FmtLayer());
Subscriber.setGlobalDefault(subscriber);
const numberOfYaks = 3;
info("preparing to shave yaks", fields({ numberOfYaks: numberOfYaks }));
const numberShaved = yakShave.shaveAll(numberOfYaks);
info("yak shaving completed", fields({
allYaksShaved: numberOfYaks === numberShaved,
}));
import { Service, OnStart } from "@flamework/core";
import { Players } from "@rbxts/services";
import { Span, info, fields } from "@rbxts-trail/core";
import { Instrument } from "@rbxts-trail/decorators";
@Service({})
export class TestService implements OnStart {
@Instrument({
name = "onPlayerAdded",
target = "src::services::TestService"
})
private onPlayerAdded(player: Player) {
const span = Span.current();
span.record("player.DisplayName", player.DisplayName);
span.record("player.Name", player.Name);
span.record("player.UserId", player.UserId);
info("{} ({}) joined the game", player.Name, player.UserId, fields({
"player.AccountAge": player.UserId,
}));
}
public onStart() {
Players.PlayerAdded.Connect((player) => {
task.spawn(() => this.onPlayerAdded(player));
});
}
}
local FmtLayer = setmetatable({}, TrailSubscriber.Layer)
FmtLayer.__index = FmtLayer
function FmtLayer.new()
return setmetatable({
_name = "FmtLayer",
}, FmtLayer)
end
function FmtLayer:onEvent(event, ctx)
local timestamp = DateTime.now():FormatLocalTime("YYYY-MM-DDTHH:MM:SSZ", "en-us")
table.insert(event.metadata.fields, "timestamp")
table.insert(event.fields, timestamp)
local levelStr = Trail.Level[event.metadata.level]:lower()
print(`[{timestamp}] [{levelStr}] {event.fields[1]}`)
end
local subscriber = Layers.new(Registry.new())
:withLayer(FmtLayer.new())
Subscriber.setGlobalDefault(subscriber)
local numberOfYaks = 3
info("preparing to shave yaks", fields { numberOfYaks = numberOfYaks })
local numberShaved = yakShave.shaveAll(numberOfYaks)
info("yak shaving completed", fields {
allYaksShaved = numberOfYaks == numberShaved,
})
local function span(number: number)
info("hi!")
end
span = instrument(span, {
name = "span_test",
target = "script",
fields = function(span, number: number)
span:record("number", number)
end,
})
span(123)
FAQs
Event-based diagnostic information inspired from tokio-rs's tracing
We found that @rbxts-trail/core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.