This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
增加 library-guidelines.md 和 library-layout.md 的翻译。并更新结构和 open-telemetry/opentelemetry-specification 保持一致 #58
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,97 @@ | ||||||||
# OpenTelemetry工程结构 | ||||||||
|
||||||||
本文档展示了OpenTelemetry项目的基本的工程结构布局。对于包结构仅展示通用的部分,对某个特定语言的包结构不做强制要求。 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已修订。顺带看了下其他文档好像英文术语的单词都是首字母大写的?我也改成全部首字母大写了 |
||||||||
|
||||||||
## API 包结构 | ||||||||
|
||||||||
OpenTelemetry API推荐的包结构。 | ||||||||
|
||||||||
从最顶层目录开始的推荐包结构布局如下: | ||||||||
|
||||||||
``` | ||||||||
api | ||||||||
├── context | ||||||||
│ └── propagation | ||||||||
├── metrics | ||||||||
├── trace | ||||||||
│ └── propagation | ||||||||
├── baggage | ||||||||
│ └── propagation | ||||||||
├── internal | ||||||||
└── logs | ||||||||
``` | ||||||||
|
||||||||
> 选择全小写、驼峰命名还是蛇形命名规则取决于使用的语言。 | ||||||||
|
||||||||
### `/context` | ||||||||
|
||||||||
本目录包含正在执行的context propagation的API。 | ||||||||
|
||||||||
### [/metrics](./metrics/api.md) | ||||||||
|
||||||||
本目录包含用于记录应用Metrics数据的Metrics API。 | ||||||||
|
||||||||
### [/baggage](baggage/api.md) | ||||||||
|
||||||||
本目录包含可以用于管理context propagation和与metrics相关的标签的 Baggage API. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 感觉中文英文句号没有统一,有些地方采用了中文有些地方英文 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已修订, 补了下issue。 #59 |
||||||||
|
||||||||
### [/trace](trace/api.md) | ||||||||
|
||||||||
跟踪 API 包含一些主要的类: | ||||||||
|
||||||||
- `Tracer` 用于所有的操作. 详见 [Tracer](trace/api.md#tracer) 章节. | ||||||||
- `Span` 是一个保存了当前执行的操作的可变对象. 详见 [Span](trace/api.md#span) 章节. | ||||||||
|
||||||||
### `/internal` (_Optional_) | ||||||||
|
||||||||
私有的库和应用代码. | ||||||||
|
||||||||
### `/logs` (_In the future_) | ||||||||
|
||||||||
> TODO: 日志操作 | ||||||||
|
||||||||
## SDK Package | ||||||||
|
||||||||
OpenTelemetry SDK 推荐的包结构。 | ||||||||
|
||||||||
从最顶层目录开始的推荐包结构布局如下: | ||||||||
|
||||||||
``` | ||||||||
sdk | ||||||||
├── context | ||||||||
├── metrics | ||||||||
├── resource | ||||||||
├── trace | ||||||||
├── baggage | ||||||||
├── internal | ||||||||
└── logs | ||||||||
``` | ||||||||
|
||||||||
> 选择全小写、驼峰命名还是蛇形命名规则取决于使用的语言。 | ||||||||
|
||||||||
### `/sdk/context` | ||||||||
|
||||||||
本目录包含api/context的SDK实现。 | ||||||||
|
||||||||
### `/sdk/metrics` | ||||||||
|
||||||||
本目录包含api/metrics的SDK实现。 | ||||||||
|
||||||||
### [/sdk/resource](resource/sdk.md) | ||||||||
|
||||||||
resource目录主要定义了[Resource](overview.md#resources)类型。该类型包含了统计和跟踪实体的信息。比如, | ||||||||
Kubernetes可以导出指向Kubernetes集群、命名空间、pod和容器名称的metrics。 | ||||||||
|
||||||||
### `/sdk/baggage` | ||||||||
|
||||||||
### [/sdk/trace](trace/sdk.md) | ||||||||
|
||||||||
本目录包含api/trace的SDK实现。 | ||||||||
|
||||||||
### `/sdk/internal` (_Optional_) | ||||||||
|
||||||||
私有应用和库代码。 | ||||||||
|
||||||||
### `/sdk/logs` (_In the future_) | ||||||||
|
||||||||
> TODO: 日志操作 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.