#Custom Spans

1 messages · Page 1 of 1 (latest)

keen saffron
agile plume
#

There are also some ideas kicking around regarding search for span names/data in Dagger Cloud UI.
The filtering out/down use case is also interesting.

#

cc @bright walrus

bright walrus
#

I've also wondered if there should be a way to promote spans from deep within a call to the top level, which we could do with a special span attribute or something (dagger.io/ui.zoom=true, or dagger.io/ui.primary=true if we think there should just be one). All up in the air though

clever hedge
#

I have a few of these ugly spans i'd like to make prettier haha

clever hedge
#

okay i got around to cleaning up and figured out a nice pattern to avoid my ugly "bash -c ..." spans.

func ExecScript(container *dagger.Container, name string, contents string, optsMaybe ...dagger.ContainerWithExecOpts) *dagger.Container {
    scriptFile := dag.Directory().WithNewFile(name, contents).File(name)
    return container.WithFile(name, scriptFile).WithExec([]string{"sh", name}, optsMaybe...)
}

Now I use ```go
ExecScript(container, "START.sh", "<many-lines...>")


And see a nicer span based on `START.sh`.