CSS.K6.Hosting.Outputs.Grafana 0.1.2-beta

This is a prerelease version of CSS.K6.Hosting.Outputs.Grafana.
dotnet add package CSS.K6.Hosting.Outputs.Grafana --version 0.1.2-beta
                    
NuGet\Install-Package CSS.K6.Hosting.Outputs.Grafana -Version 0.1.2-beta
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSS.K6.Hosting.Outputs.Grafana" Version="0.1.2-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CSS.K6.Hosting.Outputs.Grafana" Version="0.1.2-beta" />
                    
Directory.Packages.props
<PackageReference Include="CSS.K6.Hosting.Outputs.Grafana" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CSS.K6.Hosting.Outputs.Grafana --version 0.1.2-beta
                    
#r "nuget: CSS.K6.Hosting.Outputs.Grafana, 0.1.2-beta"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=CSS.K6.Hosting.Outputs.Grafana&version=0.1.2-beta&prerelease
                    
Install CSS.K6.Hosting.Outputs.Grafana as a Cake Addin
#tool nuget:?package=CSS.K6.Hosting.Outputs.Grafana&version=0.1.2-beta&prerelease
                    
Install CSS.K6.Hosting.Outputs.Grafana as a Cake Tool

CSS.K6.Hosting.Outputs.Grafana

Grafana dashboard integration for visualizing k6 load test results in .NET Aspire applications.

Overview

This package extends the k6 integration for .NET Aspire by adding Grafana dashboard support. It enables you to visualize and analyze your load testing results with pre-configured Grafana dashboards.

Features

  • Add Grafana container to your Aspire application
  • Automatic configuration of Grafana datasources
  • Built-in k6 performance dashboards
  • Support for custom dashboards
  • Integration with various data sources (requires additional providers)

Installation

dotnet add package CSS.K6.Hosting.Outputs.Grafana

Requirements

  • .NET 8.0 or .NET 9.0
  • .NET Aspire
  • CSS.K6.Hosting.Aspire
  • Docker (for running the Grafana container)

Usage

Add Grafana visualization to your k6 load testing setup:

var builder = DistributedApplication.CreateBuilder(args);

// Add your API project
var apiProject = builder.AddProject<Projects.MyApi>("api");

// Add k6 with Grafana visualization
builder.AddK6("load-testing", options => 
{
    options.ScriptDirectory = "scripts";
    options.ScriptFileName = "loadtest.js";
})
.WithApiEndpoint(apiProject)
.WithGrafanaDashboard(options => 
{
    // Customize Grafana settings (optional)
    options.ResourceName = "grafana";
    options.DashboardsPath = "dashboards";
});

// The application builder and services configuration continues...

Options

  • ResourceName: Name for the Grafana resource
  • DashboardsPath: Custom path to Grafana dashboards
  • DatasourceConfigPath: Path to custom datasource config
  • DashboardConfigPath: Path to custom dashboard config
  • ImageConfig: Container image configuration
  • CSS.K6.Hosting.Core: Core components for k6 integration
  • CSS.K6.Hosting.Aspire: Main integration for k6 in Aspire
  • CSS.K6.Hosting.Outputs.InfluxDB: InfluxDB support for storing metrics

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CSS.K6.Hosting.Outputs.Grafana:

Package Downloads
CSS.K6.Hosting.Outputs.InfluxDB

InfluxDB output provider for storing and querying k6 load test metrics in .NET Aspire applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.2-beta 165 3/5/2025
0.1.1-beta1 62 2/26/2025