Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
55 changes: 55 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Docs

on:
push:
branches: [main]
paths:
- 'content/**'
- 'static/**'
- 'layouts/**'
- 'themes/**'
- 'hugo.toml'
- '.github/workflows/docs.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment; don't cancel an in-progress production deploy.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.159.0
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Hugo (extended)
run: |
curl -sSL -o /tmp/hugo.deb \
"https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb"
sudo dpkg -i /tmp/hugo.deb
- uses: actions/configure-pages@v5
- name: Build site
run: hugo --minify --gc
- uses: actions/upload-pages-artifact@v3
with:
path: public

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
14 changes: 9 additions & 5 deletions .github/workflows/net-ci-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ on:
pull_request:

jobs:
net7:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: |
8.0.x
10.0.x
- name: Setup Submodule
run: git submodule update --init
- name: Restore dependencies
Expand All @@ -25,5 +27,7 @@ jobs:
run: dotnet build src/SkyApm.Transport.Protocol --no-restore
- name: Build
run: dotnet build --no-restore
- name: Test
- name: Test net8.0
run: dotnet test --no-build --verbosity normal --framework net8.0
- name: Test net10.0
run: dotnet test --no-build --verbosity normal --framework net10.0
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,8 @@ generated-v3/
/sample/java-integration-demo/agent

.DS_Store

# Hugo
/public/
/resources/_gen/
.hugo_build.lock
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
[submodule "src/SkyApm.Transport.Protocol/protocol-v3"]
path = src/SkyApm.Transport.Protocol/protocol-v3
url = https://github.com/apache/skywalking-data-collect-protocol
[submodule "themes/hextra"]
path = themes/hextra
url = https://github.com/imfing/hextra
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.3.0]

### Added

- .NET 10 support (`net10.0` target framework).

### Changed

- Drop the end-of-life target frameworks `netcoreapp3.1`, `net5.0` and `net6.0`. The agent now targets `net8.0` and `net10.0` (the active LTS releases); the foundational libraries (`SkyApm.Core`, `SkyApm.Abstractions`, `SkyApm.Transport.Grpc`, `SkyApm.Transport.Kafka`) keep a `netstandard2.0` compatibility floor.
- CI now builds and tests on both .NET 8 and .NET 10.

## [1.1.0]

### Added
Expand Down
50 changes: 0 additions & 50 deletions CONTIBUTING.md

This file was deleted.

59 changes: 59 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Contributing to SkyAPM-dotnet

One of the easiest ways to contribute is to participate in discussions and discuss issues. You can also contribute by submitting pull requests with code changes.

The SkyAPM .NET agent targets `net8.0` and `net10.0`, and reports traces to the SkyWalking OAP backend over the sw8 (v8) protocol.

## General feedback and discussions?

Please start a discussion on the [issue tracker](https://github.com/SkyAPM/SkyAPM-dotnet/issues).

# Build

1. Clone this repo

```bash
git clone https://github.com/SkyAPM/SkyAPM-dotnet.git
```

2. Set up the submodule

```bash
git submodule update --init
```

If this process is hung or has problems, please download all the contents from https://github.com/apache/skywalking-data-collect-protocol manually and put them in the `src/SkyApm.Transport.Protocol/protocol-v3` directory.

3. Build

> Make sure you have the .NET 8 SDK or newer installed. The protocol project (`src/SkyApm.Transport.Protocol`) must be built before the rest of the solution, because it generates the gRPC/protobuf code the agent depends on.

* Debug Mode

```bash
# Restore dependencies
dotnet restore
# Build Protocol
dotnet build src/SkyApm.Transport.Protocol --no-restore -c debug
# Build
dotnet build --no-restore -c debug
# Test
dotnet test --no-build --verbosity normal --framework net8.0 -c debug
```

* Release Mode

```bash
# Restore dependencies
dotnet restore
# Build Protocol
dotnet build src/SkyApm.Transport.Protocol --no-restore -c release
# Build
dotnet build --no-restore -c release
# Test
dotnet test --no-build --verbosity normal --framework net8.0 -c release
```

The agent multi-targets `net8.0` and `net10.0`. To run the tests against .NET 10 instead, pass `--framework net10.0`.

See also: [How to build](docs/guides/how-to-build.md) and the [documentation index](docs/README.md).
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<Import Project="build\common.props"/>
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
</PropertyGroup>
</Project>
116 changes: 26 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,121 +1,57 @@
SkyAPM C#/.NET instrument agent
==========

<img src="https://skyapmtest.github.io/page-resources/SkyAPM/skyapm.png" alt="Sky Walking logo" height="90px" align="right" />
<img src="https://skyapmtest.github.io/page-resources/SkyAPM/skyapm.png" alt="SkyAPM logo" height="90px" align="right" />

[Apache SkyWalking](https://github.com/apache/incubator-skywalking) is an APM designed for microservices, cloud native and container-based (Docker, K8s, Mesos) architectures. **SkyAPM-dotnet** provides the native support agent in C# and .NETStandard platform, with help from the Apache SkyWalking committer team.
**SkyAPM-dotnet** is a community, open-source C#/.NET auto-instrumentation agent for the .NET ecosystem. It provides distributed tracing, application topology, and metrics for ASP.NET Core and .NET applications, and reports the collected telemetry to an [Apache SkyWalking](https://skywalking.apache.org/) backend over the `sw8` / `v8` protocol. It is an independent project and is not affiliated with or endorsed by the Apache Software Foundation.

[![issues](https://img.shields.io/github/issues-raw/skyapm/skyapm-dotnet.svg?style=flat-square)](https://github.com/SkyAPM/SkyAPM-dotnet/issues)
[![pulls](https://img.shields.io/github/issues-pr-raw/skyapm/skyapm-dotnet.svg?style=flat-square)](https://github.com/SkyAPM/SkyAPM-dotnet/pulls)
[![releases](https://img.shields.io/github/release/skyapm/skyapm-dotnet.svg?style=flat-square)](https://github.com/SkyAPM/SkyAPM-dotnet/releases)
[![Gitter](https://img.shields.io/gitter/room/openskywalking/lobby.svg?style=flat-square)](https://gitter.im/openskywalking/Lobby)
[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=flat-square&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking)

## CI Build Status

| Platform | Build Server | Master Status |
|--------- |------------- |---------|
| AppVeyor | Windows/Linux |[![Build status](https://ci.appveyor.com/api/projects/status/fl6vucwfn1vu94dv/branch/master?svg=true)](https://ci.appveyor.com/project/wu-sheng/skywalking-csharp/branch/master)|

## Nuget Packages

| Package Name | NuGet | MyGet | Downloads
|--------------| ------- | ------- | ----
| SkyAPM.Agent.AspNetCore | [![nuget](https://img.shields.io/nuget/v/SkyAPM.Agent.AspNetCore.svg?style=flat-square)](https://www.nuget.org/packages/SkyAPM.Agent.AspNetCore) | [![myget](https://img.shields.io/myget/skyapm-dotnet/vpre/SkyAPM.Agent.AspNetCore.svg?style=flat-square)](https://www.myget.org/feed/skyapm-dotnet/package/nuget/SkyAPM.Agent.AspNetCore) | [![stats](https://img.shields.io/nuget/dt/SkyAPM.Agent.AspNetCore.svg?style=flat-square)](https://www.nuget.org/stats/packages/SkyAPM.Agent.AspNetCore?groupby=Version)
| SkyAPM.Agent.GeneralHost | [![nuget](https://img.shields.io/nuget/v/SkyAPM.Agent.GeneralHost.svg?style=flat-square)](https://www.nuget.org/packages/SkyAPM.Agent.GeneralHost) | [![myget](https://img.shields.io/myget/skyapm-dotnet/vpre/SkyAPM.Agent.GeneralHost.svg?style=flat-square)](https://www.myget.org/feed/skyapm-dotnet/package/nuget/SkyAPM.Agent.GeneralHost) | [![](https://img.shields.io/nuget/dt/SkyAPM.Agent.GeneralHost.svg?style=flat-square)](https://www.nuget.org/stats/packages/SkyAPM.Agent.GeneralHost?groupby=Version)

> MyGet feed URL https://www.myget.org/F/skyapm-dotnet/api/v3/index.json

# Supported
- This project currently supports apps targeting netcoreapp3.1、net5.0、net6.0 or higher.
- [Supported middlewares, frameworks and libraries.](docs/Supported-list.md)

# Features
A quick list of SkyWalking .NET Core Agent's capabilities
- Application Topology
- Distributed Tracing
- ASP.NET Core Diagnostics
- HttpClient Diagnostics
- EntityFrameworkCore Diagnostics

# Getting Started
## 📖 Documentation

## Deploy SkyWalking Backend And UI
**Full documentation lives at [skyapm.github.io/SkyAPM-dotnet](https://skyapm.github.io/SkyAPM-dotnet/)** — getting started, installation & activation, the complete configuration reference (EN / 中文), transports (gRPC / Kafka), the supported-component list, plugins, logging, the CLI, and troubleshooting.

#### Requirements
Start with v1.0.0, SkyAPM .NET Core Agent only supports SkyWalking 8.0 or higher. The SkyWalking doc is [here](https://skywalking.apache.org/docs/).

## Install SkyWalking .NET Core Agent

You can run the following command to install the SkyWalking .NET Core Agent in your project.

```
dotnet add package SkyAPM.Agent.AspNetCore
```
## CI Build Status

## How to use
Set the `ASPNETCORE_HOSTINGSTARTUPASSEMBLIES` environment variable to support the activation of the SkyAPM .NET Core Agent.
[![NET CI AND IT](https://github.com/SkyAPM/SkyAPM-dotnet/actions/workflows/net-ci-it.yml/badge.svg)](https://github.com/SkyAPM/SkyAPM-dotnet/actions/workflows/net-ci-it.yml)

- Add the assembly name of `SkyAPM.Agent.AspNetCore` to the `ASPNETCORE_HOSTINGSTARTUPASSEMBLIES` environment variable.
## NuGet Packages

### Examples
- On windows
| Package Name | NuGet | Downloads |
|--------------| ------- | ---- |
| SkyAPM.Agent.AspNetCore | [![nuget](https://img.shields.io/nuget/v/SkyAPM.Agent.AspNetCore.svg?style=flat-square)](https://www.nuget.org/packages/SkyAPM.Agent.AspNetCore) | [![stats](https://img.shields.io/nuget/dt/SkyAPM.Agent.AspNetCore.svg?style=flat-square)](https://www.nuget.org/stats/packages/SkyAPM.Agent.AspNetCore?groupby=Version) |
| SkyAPM.Agent.GeneralHost | [![nuget](https://img.shields.io/nuget/v/SkyAPM.Agent.GeneralHost.svg?style=flat-square)](https://www.nuget.org/packages/SkyAPM.Agent.GeneralHost) | [![stats](https://img.shields.io/nuget/dt/SkyAPM.Agent.GeneralHost.svg?style=flat-square)](https://www.nuget.org/stats/packages/SkyAPM.Agent.GeneralHost?groupby=Version) |

```
dotnet new mvc -n sampleapp
cd sampleapp
dotnet add package SkyAPM.Agent.AspNetCore
set ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore
set SKYWALKING__SERVICENAME=sample_app
dotnet run
```
## Quick start

- On macOS/Linux
Supported runtimes: **net8.0** and **net10.0**.

```
dotnet new mvc -n sampleapp
cd sampleapp
dotnet add package SkyAPM.Agent.AspNetCore
export ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore
export SKYWALKING__SERVICENAME=sample_app
```bash
dotnet add package SkyApm.Agent.AspNetCore
export ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyApm.Agent.AspNetCore
export SKYWALKING__SERVICENAME=my_service
dotnet run
```

## Configuration

Install `SkyAPM.DotNet.CLI`
See [**Getting Started**](https://skyapm.github.io/SkyAPM-dotnet/docs/guides/getting-started/) for the full walkthrough, and the [**Configuration reference**](https://skyapm.github.io/SkyAPM-dotnet/docs/guides/skyapm_config/) for every option.

```
dotnet tool install -g SkyAPM.DotNet.CLI
```
## Contributing

For 2.2.x or older, use `dotnet skyapm config [your_service_name] [your_servers]` to generate config file.
See [Contributing to SkyAPM-dotnet](./CONTRIBUTING.md).

```
dotnet skyapm config sample_app 192.168.0.1:11800
```
## Contact Us

For 2.3.x or newer, use `dotnet skyapm config ${your_service_name} [--reporter=grpc|kafka] [--grpcservers=...] [--kafkaservers=...]` to generate config file.
* Submit an issue on this repository for questions about the **.NET agent**.

```
# grpc
dotnet skyapm config sample_app --reporter=grpc --grpcservers=192.168.0.1:11800

# kafka
dotnet skyapm config sample_app --reporter=kafka --kafkaservers=192.168.0.1:9092
```

# Contributing
This section is in progress here: [Contributing to SkyAPM-dotnet](/CONTIBUTING.md)

# Contact Us
* Submit an issue

If you have issues about SkyWalking protocol, its official backend, ask questions at their Apache official channels. All following channels are not suitable for .net agent, but good if you are facing backend/UI issues.
For questions about the **SkyWalking protocol or its backend/UI**, use the official Apache SkyWalking channels (these are not suitable for the .NET agent):
* Submit an official Apache SkyWalking [issue](https://github.com/apache/skywalking/issues).
* Mail list: **dev@skywalking.apache.org**. Mail to `dev-subscribe@skywalking.apache.org`, follow the reply to subscribe the mail list.
* Join `skywalking` channel at [Apache Slack](https://join.slack.com/t/the-asf/shared_invite/enQtNzc2ODE3MjI1MDk1LTAyZGJmNTg1NWZhNmVmOWZjMjA2MGUyOGY4MjE5ZGUwOTQxY2Q3MDBmNTM5YTllNGU4M2QyMzQ4M2U4ZjQ5YmY). If the link is not working, find the latest one at [Apache INFRA WIKI](https://cwiki.apache.org/confluence/display/INFRA/Slack+Guest+Invites).
* Join the `skywalking` channel at [Apache Slack](https://join.slack.com/t/the-asf/shared_invite/enQtNzc2ODE3MjI1MDk1LTAyZGJmNTg1NWZhNmVmOWZjMjA2MGUyOGY4MjE5ZGUwOTQxY2Q3MDBmNTM5YTllNGU4M2QyMzQ4M2U4ZjQ5YmY). If the link is not working, find the latest one at the [Apache INFRA WIKI](https://cwiki.apache.org/confluence/display/INFRA/Slack+Guest+Invites).
* QQ Group: 392443393(2000/2000, not available), 901167865(available)

# License
## License

[Apache 2.0 License.](/LICENSE)
2 changes: 1 addition & 1 deletion build/version.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<VersionMajor>2</VersionMajor>
<VersionMinor>2</VersionMinor>
<VersionMinor>3</VersionMinor>
<VersionPatch>0</VersionPatch>
<VersionQuality></VersionQuality>
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
Expand Down
Loading
Loading