Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #1670

Merged
merged 44 commits into from
Sep 5, 2024
Merged

Release #1670

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2269681
refactor: Remove unnecessary code in StatusAPI
simlarsen Aug 29, 2024
6fb4773
refactor: Update telemetry documentation and add OpenTelemetry collec…
simlarsen Aug 30, 2024
6b0d48c
Correcting README.md
parkerdaminer Aug 31, 2024
e34cdd7
Merge pull request #1663 from parkerdaminer/patch-1
simlarsen Sep 1, 2024
8bb2c3c
refactor: Update SideMenu title to "Code Changes"
simlarsen Sep 2, 2024
6541fc4
refactor: Add AI_COPILOT_CODE_REPOSITORY_VIEW_PRIORITIES page to Side…
simlarsen Sep 2, 2024
b857555
refactor: Update SideMenu to include AI_COPILOT_CODE_REPOSITORY_VIEW_…
simlarsen Sep 2, 2024
97e60fa
refactor: Update AddDefaultCopilotActionTypes migration to use correc…
simlarsen Sep 2, 2024
c76237f
refactor: Update AddDefaultCopilotActionTypes migration to use correc…
simlarsen Sep 2, 2024
06ac018
chore: Update CopilotActionTypePriorityService and CopilotActionTypeE…
simlarsen Sep 2, 2024
b3f4406
chore: Update CopilotActionTypeUtil descriptions to use "in" instead …
simlarsen Sep 2, 2024
7512145
refactor: Add new action props for Copilot
simlarsen Sep 2, 2024
d2cb9a8
refactor: Add new action props for Copilot
simlarsen Sep 3, 2024
4314920
refactor: Update CopilotAction model and migration to add new properties
simlarsen Sep 3, 2024
4b0f71b
refactor: Update CopilotActionTypeElement import paths
simlarsen Sep 3, 2024
6398fea
refactor: Update CopilotActionTypeElement import paths
simlarsen Sep 3, 2024
5be761d
refactor: Update breadcrumb links in AICopilotBreadcrumbs and RouteMap
simlarsen Sep 3, 2024
a23039a
refactor: Update breadcrumb links in AICopilotBreadcrumbs and RouteMap
simlarsen Sep 3, 2024
7904d36
refactor: Add FileActionProp interface for Copilot actions
simlarsen Sep 3, 2024
507b214
refactor: Update CopilotActionProps to include FunctionActionProp
simlarsen Sep 3, 2024
4b98634
refactor: Update CopilotActionProps and ExceptionActionProp interfaces
simlarsen Sep 3, 2024
74d210b
refactor: Update CopilotActionType enum values and fix formatting
simlarsen Sep 3, 2024
9be38d5
refactor: Improve CopilotActionPropViewer component
simlarsen Sep 3, 2024
6a10bdf
refactor: Improve CopilotActionPropViewer component
simlarsen Sep 3, 2024
4facc12
refactor: Improve README file
simlarsen Sep 3, 2024
bd5808b
refactor: Add isPriority field to CopilotAction model
simlarsen Sep 3, 2024
1822107
refactor: Add isPriority field to CopilotAction model
simlarsen Sep 3, 2024
a993db8
Merge pull request #1667 from OneUptime/copilot-main
simlarsen Sep 3, 2024
d5af7a9
feat: Add lazy loading for OnCallDutyPolicyViewLogsView component
simlarsen Sep 4, 2024
465691e
Merge pull request #1668 from OneUptime/copilot-main
simlarsen Sep 4, 2024
2589147
refactor: Update Email component to handle SMTP authentication errors
simlarsen Sep 4, 2024
e907c23
refactor: Update WorkflowStatusElement to use Blue color for success …
simlarsen Sep 4, 2024
b8fad24
refactor: Update CopilotActionType enum values and add dependencies
simlarsen Sep 4, 2024
0559997
refactor: Update LlmType enum values and improve error message for On…
simlarsen Sep 4, 2024
012c929
refactor: Fix typo in CopilotActionType enum values and update relate…
simlarsen Sep 4, 2024
39ff367
refactor: Update LLMBase.ts and OpenAI.ts to import CopilotActionProm…
simlarsen Sep 4, 2024
b30789c
Merge pull request #1669 from OneUptime/copilot-main
simlarsen Sep 4, 2024
99daa9f
feat: Update Slack chat links in nav.ejs and README.md
simlarsen Sep 4, 2024
50c3bbb
refactor: Update Slack chat link in support.ejs
simlarsen Sep 4, 2024
7a06008
Merge branch 'copilot-main'
simlarsen Sep 4, 2024
af3455e
refactor: Update ServerMonitor documentation with start, stop, and un…
simlarsen Sep 4, 2024
eb4d832
refactor: Remove unused imports and properties in CodeRepository.ts a…
simlarsen Sep 4, 2024
989a082
refactor: Make ImproveComments methods private and update method sign…
simlarsen Sep 4, 2024
fb1f129
refactor: Remove unnecessary whitespace in CopilotActionsBase.ts and …
simlarsen Sep 4, 2024
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
2 changes: 1 addition & 1 deletion App/FeatureSet/ApiReference/views/partials/nav.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
href="/">Home</a></li>
<li><a class="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 "
target="_blank"
href="https://oneuptimesupport.slack.com/join/shared_invite/zt-1kavkds2f-gegm_wePorvwvM3M_SaoCQ#/shared-invite/email">Chat
href="https://join.slack.com/t/oneuptimesupport/shared_invite/zt-2pz5p1uhe-Fpmc7bv5ZE5xRMe7qJnwmA">Chat
with us on Slack</a></li>
<li><a class="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 "
href="/support">Support</a></li>
Expand Down
15 changes: 15 additions & 0 deletions App/FeatureSet/BaseAPI/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ import LogService, {
import TelemetryAttributeService, {
TelemetryAttributeService as TelemetryAttributeServiceType,
} from "Common/Server/Services/TelemetryAttributeService";
import CopilotActionTypePriorityService, {
Service as CopilotActionTypePriorityServiceType,
} from "Common/Server/Services/CopilotActionTypePriorityService";

import MetricService, {
MetricService as MetricServiceType,
Expand Down Expand Up @@ -425,6 +428,7 @@ import ServiceCatalogDependency from "Common/Models/DatabaseModels/ServiceCatalo
import TelemetryAttribute from "Common/Models/AnalyticsModels/TelemetryAttribute";
import ExceptionInstance from "Common/Models/AnalyticsModels/ExceptionInstance";
import TelemetyException from "Common/Models/DatabaseModels/TelemetryException";
import CopilotActionTypePriority from "Common/Models/DatabaseModels/CopilotActionTypePriority";

const BaseAPIFeatureSet: FeatureSet = {
init: async (): Promise<void> => {
Expand Down Expand Up @@ -461,6 +465,17 @@ const BaseAPIFeatureSet: FeatureSet = {
new BaseAnalyticsAPI<Log, LogServiceType>(Log, LogService).getRouter(),
);

app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<
CopilotActionTypePriority,
CopilotActionTypePriorityServiceType
>(
CopilotActionTypePriority,
CopilotActionTypePriorityService,
).getRouter(),
);

app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAnalyticsAPI<Metric, MetricServiceType>(
Expand Down
45 changes: 44 additions & 1 deletion App/FeatureSet/Docs/Content/telemetry/open-telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Once you created a token, click on "View" to view the token.
![View Service](/docs/static/images/TelemetryIngestionKeyView.png)


### Step 2 - Configure the telemetry service in your application.
### Step 2

#### Configure the telemetry service in your application.

#### Application Logs

Expand Down Expand Up @@ -56,3 +58,44 @@ export OTEL_SERVICE_NAME=my-service
If you're self-hosting oneuptime, this can be changed to your self hosted OpenTelemetry collector endpoint (eg: `http(s)://<your-oneuptime-host>/otlp`)

Once you run your application, you should see the logs in the OneUptime telemetry service page. Please contact support@oneuptime.com if you need any help.


#### Using OpenTelemetry Collector

You can also use the OpenTelemetry collector instead of sending telemetry data directly from your application.
If you are using OpenTelemetry Collector, you can configure the OneUptime exporter in the collector configuration file.

Here is the example configuration for OpenTelemetry Collector.

```yaml
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

exporters:

# Export over HTTP
otlphttp:
endpoint: "https://oneuptime.com/otlp"
# Requires use JSON encoder insted of default Proto(buf)
encoding: json
headers:
"Content-Type": "application/json"
"x-oneuptime-token": "ONEUPTIME_TOKEN" # Your OneUptime token

service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlphttp]
metrics:
receivers: [otlp]
exporters: [otlphttp]
logs:
receivers: [otlp]
exporters: [otlphttp]
```
2 changes: 1 addition & 1 deletion App/FeatureSet/Home/Views/Partials/copilot.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<span><strong class="font-semibold text-gray-900">
Automatically add telemetry code.
</strong>
No need to manually add it. Add tracing, metrics, and logs to your codebase with a single
No need to manually add it. Add tracing, metrics, and logs in your codebase with a single
click.
</span>
</li>
Expand Down
2 changes: 1 addition & 1 deletion App/FeatureSet/Home/Views/support.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<p class="mt-4 text-base text-gray-500">We are here to help with any questions related to Dashboard, API, Product Features, etc. Chat with us on Slack. Enterprise customers have a dedicated Slack channel with us.</p>
</div>
<div class="rounded-bl-2xl rounded-br-2xl bg-gray-50 p-6 md:px-8">
<a href="https://oneuptimesupport.slack.com/join/shared_invite/zt-1kavkds2f-gegm_wePorvwvM3M_SaoCQ" target="_blank" class="text-base font-medium text-indigo-700 hover:text-indigo-600">Chat on Slack<span aria-hidden="true"> &rarr;</span></a>
<a href="https://join.slack.com/t/oneuptimesupport/shared_invite/zt-2pz5p1uhe-Fpmc7bv5ZE5xRMe7qJnwmA" target="_blank" class="text-base font-medium text-indigo-700 hover:text-indigo-600">Chat on Slack<span aria-hidden="true"> &rarr;</span></a>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import DataMigrationBase from "./DataMigrationBase";
import LIMIT_MAX from "Common/Types/Database/LimitMax";
import CopilotCodeRepository from "Common/Models/DatabaseModels/CopilotCodeRepository";
import CopilotCodeRepositoryService from "Common/Server/Services/CopilotCodeRepositoryService";
import {
CopilotActionTypeData,
CopilotActionTypeUtil,
} from "Common/Types/Copilot/CopilotActionType";
import CopilotActionTypePriority from "Common/Models/DatabaseModels/CopilotActionTypePriority";
import CopilotActionTypePriorityService from "Common/Server/Services/CopilotActionTypePriorityService";

export default class AddDefaultCopilotActionTypes extends DataMigrationBase {
public constructor() {
super("AddDefaultCopilotActionTypes");
}

public override async migrate(): Promise<void> {
// get all the users with email isVerified true.

const repositories: Array<CopilotCodeRepository> =
await CopilotCodeRepositoryService.findBy({
query: {},
select: {
_id: true,
projectId: true,
},
skip: 0,
limit: LIMIT_MAX,
props: {
isRoot: true,
},
});

for (const repo of repositories) {
const defaultCopilotActionTypes: Array<CopilotActionTypeData> =
CopilotActionTypeUtil.getAllCopilotActionTypes();

for (const defaultAction of defaultCopilotActionTypes) {
const copilotActionTypePriority: CopilotActionTypePriority =
new CopilotActionTypePriority();
copilotActionTypePriority.projectId = repo.projectId!;
copilotActionTypePriority.actionType = defaultAction.type;
copilotActionTypePriority.priority = defaultAction.defaultPriority;
copilotActionTypePriority.codeRepositoryId = repo.id!;

await CopilotActionTypePriorityService.create({
data: copilotActionTypePriority,
props: {
isRoot: true,
},
});
}
}
}

public override async rollback(): Promise<void> {
return;
}
}
2 changes: 2 additions & 0 deletions App/FeatureSet/Workers/DataMigrations/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import UpdateGlobalConfigFromEnv from "./UpdateGlobalCongfigFromEnv";
import MigrateServiceLanguageToTechStack from "./MigrateServiceLanguageToTechStack";
import DeleteOldTelemetryTable from "./DeleteOldTelelmetryTable";
import MoveTelemetryServiceTokenToTelemetryIngestionKey from "./MoveTelemetryServiceTokenToTelemetryIngestionKey";
import AddDefaultCopilotActionTypes from "./AddDefaultCopilotActionTypes";

// This is the order in which the migrations will be run. Add new migrations to the end of the array.

Expand Down Expand Up @@ -73,6 +74,7 @@ const DataMigrations: Array<DataMigrationBase> = [
new MigrateServiceLanguageToTechStack(),
new DeleteOldTelemetryTable(),
new MoveTelemetryServiceTokenToTelemetryIngestionKey(),
new AddDefaultCopilotActionTypes(),
];

export default DataMigrations;
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RunCron(
},
async () => {
return await Telemetry.startActiveSpan<Promise<void>>({
name: "StatusPageCerts:OrderSSL",
name: "StatusPageCerts.OrderSSL",
options: {
attributes: {
schedule: IsDevelopment ? EVERY_FIFTEEN_MINUTE : EVERY_FIFTEEN_MINUTE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This trigger lets you start the workflow with the incoming HTTP request.
**URL of this trigger:**


```
```yaml
{{serverUrl}}workflow/trigger/{{workflowId}}
```

Expand Down
Loading
Loading