Browse Source

feat(logging): Optimize the OpenObserve log module

- Remove the custom OpenObserve client
- Reference the OpenObserve module
pull/1599/head
colin 2 months ago
parent
commit
d1da10ece5
  1. 7
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN.Abp.Logging.Serilog.OpenObserve.csproj
  2. 13
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/AbpLoggingSerilogOpenObserveModule.cs
  3. 3
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/AbpLoggingSerilogOpenObserveOptions.cs
  4. 6
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/OpenObserveConstants.cs
  5. 40
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/OpenObserveErrorResponse.cs
  6. 14
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/OpenObserveRequestException.cs
  7. 14
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/OpenObserveSearchException.cs
  8. 7
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchAgentMode.cs
  9. 35
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchAgentOptions.cs
  10. 8
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchAgentOutputFormat.cs
  11. 41
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchQuery.cs
  12. 48
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchRequest.cs
  13. 29
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchResponse.cs
  14. 9
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchType.cs
  15. 4
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/SerilogTotal.cs
  16. 56
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/OpenObserveClient.cs
  17. 22
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/SerilogOpenObserveLoggingProvider.cs
  18. 10
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/README.md
  19. 28
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/System/Net/Http/HttpClientOpenObserveExtensions.cs
  20. 6
      aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/appsettings.Development.json
  21. 2
      deploy/openobserve/otel-collector-config.yaml
  22. 4
      docker-compose.override.configuration.yml

7
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN.Abp.Logging.Serilog.OpenObserve.csproj

@ -14,12 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.Json" />
<PackageReference Include="Microsoft.Extensions.Http" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\open-observe\LINGYUN.Abp.OpenObserve\LINGYUN.Abp.OpenObserve.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.Logging\LINGYUN.Abp.Logging.csproj" />
</ItemGroup>

13
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/AbpLoggingSerilogOpenObserveModule.cs

@ -1,15 +1,12 @@
using Microsoft.Extensions.DependencyInjection;
using System.Net.Http;
using Volo.Abp.Json;
using Volo.Abp.Mapperly;
using LINGYUN.Abp.OpenObserve;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve;
[DependsOn(
typeof(AbpLoggingModule),
typeof(AbpMapperlyModule),
typeof(AbpJsonModule))]
typeof(AbpOpenObserveModule))]
public class AbpLoggingSerilogOpenObserveModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
@ -18,10 +15,6 @@ public class AbpLoggingSerilogOpenObserveModule : AbpModule
Configure<AbpLoggingSerilogOpenObserveOptions>(configuration.GetSection("Logging:Serilog:OpenObserve"));
context.Services.AddMapperlyObjectMapper<AbpLoggingSerilogOpenObserveModule>();
context.Services.AddOpenObserveHttpClient();
context.Services.AddKeyedTransient<ILoggingProvider, SerilogOpenObserveLoggingProvider>("OpenObserveLoggingProvider");
}
}

3
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/AbpLoggingSerilogOpenObserveOptions.cs

@ -2,14 +2,11 @@
public class AbpLoggingSerilogOpenObserveOptions
{
public string Endpoint { get; set; }
public string Stream { get; set; }
public string Organization { get; set; }
public string? AccessToken { get; set; }
public AbpLoggingSerilogOpenObserveOptions()
{
Endpoint = "http://localhost:5080";
Stream = "default";
Organization = "default";
}

6
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/OpenObserveConstants.cs

@ -1,6 +0,0 @@
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models;
internal static class OpenObserveConstants
{
public const int ZO_QUERY_TIMEOUT = 600;
}

40
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/OpenObserveErrorResponse.cs

@ -1,40 +0,0 @@
using System;
using System.Text.Json.Serialization;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models;
[Serializable]
public class OpenObserveErrorResponse
{
/// <summary>
/// Numeric error code (see below)
/// </summary>
[JsonPropertyName("code")]
public int Code { get; set; }
/// <summary>
/// Human-readable problem description
/// </summary>
[JsonPropertyName("message")]
public string Message { get; set; } = default!;
/// <summary>
/// Raw technical detail (omitted when hint/suggestions are present)
/// </summary>
[JsonPropertyName("error_detail")]
public string? ErrorDetail { get; set; }
/// <summary>
/// One-line guidance on how to fix the error
/// </summary>
[JsonPropertyName("hint")]
public string? Hint { get; set; }
/// <summary>
/// Closest valid alternatives (up to 3), ranked by similarity
/// </summary>
[JsonPropertyName("suggestions")]
public string? Suggestions { get; set; }
[JsonPropertyName("trace_id")]
public string? TraceId { get; set; }
}

14
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/OpenObserveRequestException.cs

@ -1,14 +0,0 @@
using System;
using System.Net.Http;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models;
public class OpenObserveRequestException : Exception
{
public HttpResponseMessage HttpResponseMessage { get; }
public OpenObserveRequestException(HttpResponseMessage responseMessage)
: base(responseMessage.ReasonPhrase)
{
HttpResponseMessage = responseMessage;
}
}

14
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/OpenObserveSearchException.cs

@ -1,14 +0,0 @@
using System;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
public class OpenObserveSearchException : Exception
{
public int Code => Error.Code;
public OpenObserveErrorResponse Error { get; }
public OpenObserveSearchException(OpenObserveErrorResponse error)
: base(error.Message)
{
Error = error;
}
}

7
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchAgentMode.cs

@ -1,7 +0,0 @@
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
public enum SearchAgentMode
{
Default = 0,
Partition = 1,
}

35
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchAgentOptions.cs

@ -1,35 +0,0 @@
using System.Text.Json.Serialization;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
public class SearchAgentOptions
{
/// <summary>
/// query execution mode: default (result cache path) or partition (streaming partition loop, see below)
/// </summary>
[JsonPropertyName("mode")]
public string? Mode { get; }
/// <summary>
/// response format for hits: json, csv, or md_table
/// </summary>
[JsonPropertyName("output_format")]
public string? OutputFormat { get; }
public SearchAgentOptions(
SearchAgentMode mode = SearchAgentMode.Default,
SearchAgentOutputFormat outputFormat = SearchAgentOutputFormat.Json)
{
Mode = mode switch
{
SearchAgentMode.Default => "default",
SearchAgentMode.Partition => "partition",
_ => "default",
};
OutputFormat = outputFormat switch
{
SearchAgentOutputFormat.Json => "json",
SearchAgentOutputFormat.Csv => "csv",
SearchAgentOutputFormat.MdTable => "md_table",
_ => "json",
};
}
}

8
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchAgentOutputFormat.cs

@ -1,8 +0,0 @@
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
public enum SearchAgentOutputFormat
{
Json = 0,
Csv = 1,
MdTable = 2,
}

41
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchQuery.cs

@ -1,41 +0,0 @@
using System;
using System.Text.Json.Serialization;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
public class SearchQuery
{
/// <summary>
/// use SQL query data, and filter data by start_time and end_time, and default order by _timestamp, you can use order by override order, and fetch offset limit by form and size
/// </summary>
[JsonPropertyName("sql")]
public string Sql { get; set; }
/// <summary>
/// unit: microseconds, filter data by time range, you need always provide this value
/// </summary>
[JsonPropertyName("start_time")]
public long StartTime { get; set; }
/// <summary>
/// unit: microseconds, filter data by time range, you need always provide this value
/// </summary>
[JsonPropertyName("end_time")]
public long EndTime { get; set; }
/// <summary>
/// offset in SQL
/// </summary>
[JsonPropertyName("from")]
public long From { get; set; }
/// <summary>
/// limit in SQL
/// </summary>
[JsonPropertyName("size")]
public long Size { get; set; }
public SearchQuery(string sql, DateTime startTime, DateTime endTime, long from = 0, long size = 10)
{
Sql = sql;
StartTime = startTime.ToMicroseconds();
EndTime = endTime.ToMicroseconds();
From = from;
Size = size;
}
}

48
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchRequest.cs

@ -1,48 +0,0 @@
using System.Text.Json.Serialization;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
public class SearchRequest
{
/// <summary>
/// query params
/// </summary>
[JsonPropertyName("query")]
public SearchQuery Query { get; }
/// <summary>
/// default is empty, support: ui, dashboards, reports, alerts
/// </summary>
[JsonPropertyName("search_type")]
public string? SearchType { get; }
/// <summary>
/// default value based on ZO_QUERY_TIMEOUT=600
/// </summary>
[JsonPropertyName("timeout")]
public int? Timeout { get; }
/// <summary>
/// options for agent/MCP clients
/// </summary>
[JsonPropertyName("agent_options")]
public SearchAgentOptions? AgentOptions { get; }
public SearchRequest(
SearchQuery query,
SearchType? searchType = null,
int? timeout = OpenObserveConstants.ZO_QUERY_TIMEOUT,
SearchAgentOptions? agentOptions = null)
{
Query = query;
Timeout = timeout;
AgentOptions = agentOptions;
if (searchType != null)
{
SearchType = searchType switch
{
Search.SearchType.UI => "ui",
Search.SearchType.Dashboards => "dashboards",
Search.SearchType.Reports => "reports",
Search.SearchType.Alerts => "alerts",
_ => null,
};
}
}
}

29
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchResponse.cs

@ -1,29 +0,0 @@
using System;
using System.Text.Json.Serialization;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
[Serializable]
public class SearchResponse<THit>
{
[JsonPropertyName("hits")]
public THit[] Hits { get; set; } = new THit[0];
[JsonPropertyName("total")]
public long Total { get; set; }
[JsonPropertyName("from")]
public int From { get; set; }
[JsonPropertyName("size")]
public int Size { get; set; }
[JsonPropertyName("trace_id")]
public string? TraceId { get; set; }
[JsonPropertyName("order_by")]
public string? OrderBy { get; set; }
[JsonPropertyName("order_by_metadata")]
public string[][]? OrderByMetadata { get; set; }
}

9
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchType.cs

@ -1,9 +0,0 @@
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
public enum SearchType
{
UI = 0,
Dashboards = 1,
Reports = 2,
Alerts = 3,
}

4
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/Search/SearchTotal.cs → aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/Models/SerilogTotal.cs

@ -1,8 +1,8 @@
using System.Text.Json.Serialization;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve.Models;
public class SearchTotal
public class SerilogTotal
{
[JsonPropertyName("total")]
public long Total { get; set; }

56
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/OpenObserveClient.cs

@ -1,56 +0,0 @@
using LINGYUN.Abp.Logging.Serilog.OpenObserve.Models;
using LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
using Microsoft.Extensions.Options;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Json;
namespace LINGYUN.Abp.Logging.Serilog.OpenObserve;
public partial class OpenObserveClient
{
protected HttpClient HttpClient { get; }
protected IJsonSerializer JsonSerializer { get; }
protected AbpLoggingSerilogOpenObserveOptions Options { get; }
public OpenObserveClient(
HttpClient httpClient,
IJsonSerializer jsonSerializer,
IOptions<AbpLoggingSerilogOpenObserveOptions> options)
{
HttpClient = httpClient;
Options = options.Value;
JsonSerializer = jsonSerializer;
}
public async virtual Task<SearchResponse<THint>> SearchAsync<THint>(
SearchQuery query,
SearchType? searchType = null,
int? timeout = OpenObserveConstants.ZO_QUERY_TIMEOUT,
SearchAgentOptions? agentOptions = null,
CancellationToken cancellationToken = default)
{
var httpResponse = await HttpClient.PostAsJsonAsync(
$"/api/{Options.Organization}/_search",
new SearchRequest(query, searchType, timeout, agentOptions),
cancellationToken);
if (httpResponse.IsSuccessStatusCode)
{
var responseContent = await httpResponse.Content.ReadAsStringAsync(cancellationToken);
return JsonSerializer.Deserialize<SearchResponse<THint>>(responseContent);
}
var statusCode = (int)httpResponse.StatusCode;
if (statusCode >= 400 && statusCode < 500)
{
var responseContent = await httpResponse.Content.ReadAsStringAsync(cancellationToken);
var errorResponse = JsonSerializer.Deserialize<OpenObserveErrorResponse>(responseContent);
throw new OpenObserveSearchException(errorResponse);
}
throw new OpenObserveRequestException(httpResponse);
}
}

22
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/LINGYUN/Abp/Logging/Serilog/OpenObserve/SerilogOpenObserveLoggingProvider.cs

@ -1,6 +1,7 @@
using LINGYUN.Abp.Logging.Serilog.OpenObserve.Models;
using LINGYUN.Abp.Logging.Serilog.OpenObserve.Models.Search;
using LINGYUN.Abp.Logging.Serilog.OpenObserve.Utils;
using LINGYUN.Abp.OpenObserve;
using LINGYUN.Abp.OpenObserve.Models.Search;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
@ -38,7 +39,8 @@ public class SerilogOpenObserveLoggingProvider : ILoggingProvider
}
var response = await Client.SearchAsync<SerilogInfo>(
new Models.Search.SearchQuery(
Options.Organization,
new SearchQuery(
$"select * from {Options.Stream} where uniqueid = {uniqueId}",
GetOrDefaultStartTime(),
Clock.Now),
@ -85,8 +87,9 @@ public class SerilogOpenObserveLoggingProvider : ILoggingProvider
threadId,
hasException));
var response = await Client.SearchAsync<SearchTotal>(
new Models.Search.SearchQuery(
var response = await Client.SearchAsync<SerilogTotal>(
Options.Organization,
new SearchQuery(
sqlBuilder.ToString(),
GetOrDefaultStartTime(startTime),
endTime ?? Clock.Now),
@ -120,8 +123,9 @@ public class SerilogOpenObserveLoggingProvider : ILoggingProvider
&& (x.Op == ComparisonOp.LessThanOrEqual || x.Op == ComparisonOp.LessThan))
?.Value as DateTime?;
var response = await Client.SearchAsync<SearchTotal>(
new Models.Search.SearchQuery(
var response = await Client.SearchAsync<SerilogTotal>(
Options.Organization,
new SearchQuery(
sqlBuilder.ToString(),
GetOrDefaultStartTime(startTime),
endTime ?? Clock.Now),
@ -177,7 +181,8 @@ public class SerilogOpenObserveLoggingProvider : ILoggingProvider
}
var response = await Client.SearchAsync<SerilogInfo>(
new Models.Search.SearchQuery(
Options.Organization,
new SearchQuery(
sqlBuilder.ToString(),
GetOrDefaultStartTime(startTime),
endTime ?? Clock.Now,
@ -217,7 +222,8 @@ public class SerilogOpenObserveLoggingProvider : ILoggingProvider
?.Value as DateTime?;
var response = await Client.SearchAsync<SerilogInfo>(
new Models.Search.SearchQuery(
Options.Organization,
new SearchQuery(
sqlBuilder.ToString(),
GetOrDefaultStartTime(startTime),
endTime ?? Clock.Now,

10
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/README.md

@ -25,10 +25,8 @@ public class YouProjectModule : AbpModule
## 配置项
* AbpLoggingSerilogOpenObserveOptions.Endpoint 部署的OpenObserve服务器地址
* AbpLoggingSerilogOpenObserveOptions.Stream 存储日志的stream名称
* AbpLoggingSerilogOpenObserveOptions.Organization 存储日志的organization名称
* AbpLoggingSerilogOpenObserveOptions.AccessToken 调用接口的访问令牌,可在OpenObserve控制台/IAM/服务账号中获取,格式: Basic XXXXXXXXXXX
## appsettings.json
@ -38,12 +36,14 @@ public class YouProjectModule : AbpModule
"Provider": "OpenObserveLoggingProvider",
"Serilog": {
"OpenObserve": {
"Endpoint": "http://localhost:5080",
"Stream": "default",
"Organization": "default",
"AccessToken": "Basic XXXXXXXXXXX"
"Organization": "default"
}
}
},
"OpenObserve": {
"Endpoint": "http://localhost:5080",
"AccessToken": "Basic XXXXXXXXXXX"
}
}
```

28
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.OpenObserve/System/Net/Http/HttpClientOpenObserveExtensions.cs

@ -1,28 +0,0 @@
using LINGYUN.Abp.Logging.Serilog.OpenObserve;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System.Net.Http.Headers;
namespace System.Net.Http;
internal static class HttpClientOpenObserveExtensions
{
private const string HttpClientName = "__Abp_OpenObserve_Client";
public static IServiceCollection AddOpenObserveHttpClient(this IServiceCollection services)
{
services.AddHttpClient<OpenObserveClient>(
HttpClientName,
(sp, client) =>
{
var options = sp.GetRequiredService<IOptions<AbpLoggingSerilogOpenObserveOptions>>().Value;
client.BaseAddress = new Uri(options.Endpoint);
if (!options.AccessToken.IsNullOrWhiteSpace() && AuthenticationHeaderValue.TryParse(options.AccessToken, out var authenticationHeader))
{
client.DefaultRequestHeaders.Authorization = authenticationHeader;
}
});
return services;
}
}

6
aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/appsettings.Development.json

@ -86,12 +86,12 @@
"Serilog": {
"Elasticsearch": {
"IndexFormat": "abp.dev.logging-{0:yyyy.MM.dd}"
},
"OpenObserve": {
"Endpoint": "http://localhost:5080"
}
}
},
"OpenObserve": {
"Endpoint": "http://localhost:5080"
},
"AuditLogging": {
"Elasticsearch": {
"IndexPrefix": "abp.dev.auditing"

2
deploy/openobserve/otel-collector-config.yaml

@ -15,7 +15,7 @@ exporters:
otlphttp:
endpoint: http://host.docker.internal:5080/api/default
headers:
Authorization: Basic YWRtaW5AYWJwLmlvOm8yb2lfbG5MMkdOT3ZOSFVNaDhqYVpLSDFNdk10d0taTHBKWnQ=
Authorization: Basic YWRtaW5AYWJwLmlvOnd3MVo1TCU2
stream-name: default
extensions:

4
docker-compose.override.configuration.yml

@ -192,8 +192,8 @@ services:
- OpenTelemetry__Otlp__Protocol=HttpProtobuf
- Serilog__WriteTo__2__Name=OpenTelemetry
- Serilog__WriteTo__2__Args__endpoint=http://host.docker.internal:4318
- Logging__Serilog__OpenObserve__Endpoint=http://host.docker.internal:5080
- Logging__Serilog__OpenObserve__AccessToken=Basic YWJwLW1jcC5kZWZhdWx0QHNhLmludGVybmFsOkh6bXFzWlNTWXc4YVdMVXA=
- OpenObserve__Endpoint=http://host.docker.internal:5080
- OpenObserve__AccessToken=Basic YWRtaW5AYWJwLmlvOnd3MVo1TCU2
localization-service:
environment:

Loading…
Cancel
Save